Browse Source

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)
Jonathan Golder 1 year ago
parent
commit
5cdccaeec6
1 changed files with 7 additions and 0 deletions
  1. 7
    0
      bots/missingnotice.py

+ 7
- 0
bots/missingnotice.py View File

@@ -58,13 +58,20 @@ ON `cl_from` = `page_id`
58 58
         # query articles containing notice
59 59
         self.categorized_articles = type(self).get_categorized_articles()
60 60
 
61
+        fam_counter = 0
62
+
61 63
         # iterate open redfams
62 64
         for redfam in RedFamWorker.gen_open():
65
+            fam_counter += 1
63 66
             links = self.treat_open_redfam(redfam)
64 67
 
65 68
             if links:
66 69
                 self.page_content.append( self.format_row( links ) )
67 70
 
71
+            if (fam_counter % 50) == 0:
72
+                jogobot.output( "Processed {n:d} open RedFams".format(
73
+                    n=fam_counter))
74
+
68 75
         else:
69 76
             # To write "absent" states to db
70 77
             RedFamWorker.flush_db_cache()