mirror of
https://gitlab.com/chicken-riders/RcGcDb.git
synced 2025-02-23 00:54:09 +00:00
Let's be honest, this probably won't set anything on fire and will prevent some expensive calls
This commit is contained in:
parent
7723133847
commit
9a5f57cda6
13
src/bot.py
13
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:
|
||||
|
|
Loading…
Reference in a new issue