From 9a5f57cda626138c634067ce1c1f9d25597233c9 Mon Sep 17 00:00:00 2001 From: Frisk Date: Thu, 18 Mar 2021 00:10:04 +0100 Subject: [PATCH] Let's be honest, this probably won't set anything on fire and will prevent some expensive calls --- src/bot.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/bot.py b/src/bot.py index e99e850..ac6808e 100644 --- a/src/bot.py +++ b/src/bot.py @@ -114,12 +114,13 @@ class RcQueue: """Retrives next wiki in the queue for given domain""" if len(self.domain_list[group]["query"]) == 0: # make sure we are not removing the group because entire domain group went down, it's expensive - yes, but could theoretically cause issues - if self.check_if_domain_in_db(group): - #logger.warning("Domain group {} has 0 elements yet there are still wikis in the db of the same domain group! This may indicate we ran over the list too fast. We are waiting...".format(group)) - raise QueueEmpty - else: - await self.stop_task_group(group) - return + raise QueueEmpty + # if self.check_if_domain_in_db(group): + # #logger.warning("Domain group {} has 0 elements yet there are still wikis in the db of the same domain group! This may indicate we ran over the list too fast. We are waiting...".format(group)) + # raise QueueEmpty + # else: + # await self.stop_task_group(group) + # return try: yield self.domain_list[group]["query"][0] except asyncio.CancelledError: