diff --git a/src/bot.py b/src/bot.py index 4c39680..55f5427 100644 --- a/src/bot.py +++ b/src/bot.py @@ -162,12 +162,12 @@ class RcQueue: try: current_domain: dict = self[domain] if current_domain["irc"]: - logger.debug('CURRENT STATUS:') logger.debug("DOMAIN LIST FOR IRC: {}".format(current_domain["irc"].updated)) logger.debug("CURRENT DOMAIN INFO: {}".format(domain)) logger.debug("IS WIKI IN A LIST?: {}".format(db_wiki["wiki"] in current_domain["irc"].updated)) logger.debug("LAST CHECK FOR THE WIKI {} IS {}".format(db_wiki["wiki"], all_wikis[db_wiki["wiki"]].last_check)) if db_wiki["wiki"] not in current_domain["irc"].updated and all_wikis[db_wiki["wiki"]].last_check+settings["irc_overtime"] > time.time(): + logger.debug('Skipping wiki {}'.format(db_wiki["wiki"])) continue # if domain has IRC, has not been updated, and it was updated less than an hour ago else: # otherwise remove it from the list try: diff --git a/src/wiki.py b/src/wiki.py index 4366efa..a485344 100644 --- a/src/wiki.py +++ b/src/wiki.py @@ -145,10 +145,10 @@ async def process_cats(event: dict, local_wiki: Wiki, category_msgs: dict, categ wiki_cat_mw_messages = category_msgs[local_wiki.mw_messages] if wiki_cat_mw_messages[0][1] in comment_to_match or wiki_cat_mw_messages[2][1] in comment_to_match: # Added to category categorize_events[event["revid"]]["new"].add(cat_title) - logger.debug("Matched {} to added category for {}".format(cat_title, event["revid"])) + #logger.debug("Matched {} to added category for {}".format(cat_title, event["revid"])) elif wiki_cat_mw_messages[1][1] in comment_to_match or wiki_cat_mw_messages[3][1] in comment_to_match: # Removed from category categorize_events[event["revid"]]["removed"].add(cat_title) - logger.debug("Matched {} to removed category for {}".format(cat_title, event["revid"])) + #logger.debug("Matched {} to removed category for {}".format(cat_title, event["revid"])) else: logger.debug( "Unknown match for category change with messages {}, {}, {}, {} and comment_to_match {}".format( @@ -197,7 +197,7 @@ async def essential_info(change: dict, changed_categories, local_wiki: Wiki, tar """Prepares essential information for both embed and compact message format.""" _ = langs[target[0][0]]["wiki"].gettext changed_categories = changed_categories.get(change["revid"], None) - logger.debug("List of categories in essential_info: {}".format(changed_categories)) + #logger.debug("List of categories in essential_info: {}".format(changed_categories)) appearance_mode = embed_formatter if target[0][1] > 0 else compact_formatter if "actionhidden" in change or "suppressed" in change: # if event is hidden using suppression await appearance_mode("suppressed", change, "", changed_categories, local_wiki, target, paths, rate_limiter) diff --git a/src/wiki_ratelimiter.py b/src/wiki_ratelimiter.py index 21acbd5..98d785c 100644 --- a/src/wiki_ratelimiter.py +++ b/src/wiki_ratelimiter.py @@ -9,11 +9,11 @@ class RateLimiter: def timeout_add(self, timeout: float): """This function sets a new timeout""" self.timeout_until = time.time() + timeout - logger.debug("Added {} timeout".format(timeout)) + #logger.debug("Added {} timeout".format(timeout)) async def timeout_wait(self): """This awaitable calculates the time to wait according to timeout_until, does not wait if it's past the timeout to not skip a cycle""" calculated_timeout = self.timeout_until - time.time() - logger.debug("Waiting {}".format(calculated_timeout)) + #logger.debug("Waiting {}".format(calculated_timeout)) if calculated_timeout > 0: await asyncio.sleep(calculated_timeout)