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"""
|
"""Retrives next wiki in the queue for given domain"""
|
||||||
if len(self.domain_list[group]["query"]) == 0:
|
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
|
# 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):
|
raise QueueEmpty
|
||||||
#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))
|
# if self.check_if_domain_in_db(group):
|
||||||
raise QueueEmpty
|
# #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))
|
||||||
else:
|
# raise QueueEmpty
|
||||||
await self.stop_task_group(group)
|
# else:
|
||||||
return
|
# await self.stop_task_group(group)
|
||||||
|
# return
|
||||||
try:
|
try:
|
||||||
yield self.domain_list[group]["query"][0]
|
yield self.domain_list[group]["query"][0]
|
||||||
except asyncio.CancelledError:
|
except asyncio.CancelledError:
|
||||||
|
|
Loading…
Reference in a new issue