Start ignoring the additional delay for wikis with IRC feed. We have IRC feed only for more active domains so this additional delay does more bad than good

This commit is contained in:
Frisk 2021-03-08 19:00:12 +01:00
parent d7661469a2
commit 5e08b4a501
No known key found for this signature in database
GPG key ID: 213F7C15068AF8AC

View file

@ -249,7 +249,8 @@ async def scan_group(group: str):
while True: while True:
try: try:
async with rcqueue.retrieve_next_queued(group) as queued_wiki: # acquire next wiki in queue async with rcqueue.retrieve_next_queued(group) as queued_wiki: # acquire next wiki in queue
await asyncio.sleep(calculate_delay_for_group(len(rcqueue[group]["query"]))) if "irc" not in rcqueue[group]:
await asyncio.sleep(calculate_delay_for_group(len(rcqueue[group]["query"])))
logger.debug("Wiki {}".format(queued_wiki.url)) logger.debug("Wiki {}".format(queued_wiki.url))
local_wiki = all_wikis[queued_wiki.url] # set a reference to a wiki object from memory local_wiki = all_wikis[queued_wiki.url] # set a reference to a wiki object from memory
extended = False extended = False
@ -346,7 +347,7 @@ async def scan_group(group: str):
except asyncio.CancelledError: except asyncio.CancelledError:
return return
except QueueEmpty: except QueueEmpty:
await asyncio.sleep(21.0) await asyncio.sleep(10.0)
continue continue