소스 검색

missingnotice: Add RedFam counter output

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

Issue #64 (https://git.golderweb.de/wiki/jogobot-red/issues/64)
develop
Jonathan Golder 6 년 전
부모
커밋
5cdccaeec6
  1. 7
      bots/missingnotice.py

7
bots/missingnotice.py

@ -58,13 +58,20 @@ ON `cl_from` = `page_id`
# query articles containing notice
self.categorized_articles = type(self).get_categorized_articles()
fam_counter = 0
# iterate open redfams
for redfam in RedFamWorker.gen_open():
fam_counter += 1
links = self.treat_open_redfam(redfam)
if 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:
# To write "absent" states to db
RedFamWorker.flush_db_cache()

불러오는 중...
취소
저장