missingnotice: Add RedFam counter output

Signalize bot is working, since processing RedFams takes about
15 minutes with out any output right now

Issue #64 (#64)
This commit is contained in:
2018-09-25 17:51:01 +02:00
parent 54d8b8ea3b
commit 5cdccaeec6

View File

@@ -58,13 +58,20 @@ ON `cl_from` = `page_id`
# query articles containing notice # query articles containing notice
self.categorized_articles = type(self).get_categorized_articles() self.categorized_articles = type(self).get_categorized_articles()
fam_counter = 0
# iterate open redfams # iterate open redfams
for redfam in RedFamWorker.gen_open(): for redfam in RedFamWorker.gen_open():
fam_counter += 1
links = self.treat_open_redfam(redfam) links = self.treat_open_redfam(redfam)
if links: if links:
self.page_content.append( self.format_row( links ) ) self.page_content.append( self.format_row( links ) )
if (fam_counter % 50) == 0:
jogobot.output( "Processed {n:d} open RedFams".format(
n=fam_counter))
else: else:
# To write "absent" states to db # To write "absent" states to db
RedFamWorker.flush_db_cache() RedFamWorker.flush_db_cache()