Fix log_ring_worker
This commit is contained in:
parent
aabc6d142f
commit
0ef940e065
|
@ -22,13 +22,14 @@ async def main():
|
||||||
text = log_ring.popleft()
|
text = log_ring.popleft()
|
||||||
except IndexError:
|
except IndexError:
|
||||||
pass
|
pass
|
||||||
while True:
|
else:
|
||||||
try:
|
while True:
|
||||||
await slave.send_message(config['config']['log_chat'], text, disable_web_page_preview=True)
|
try:
|
||||||
except FloodWait as ex:
|
await slave.send_message(config['config']['log_chat'], text, disable_web_page_preview=True)
|
||||||
await asyncio.sleep(ex.x + 1)
|
except FloodWait as ex:
|
||||||
else:
|
await asyncio.sleep(ex.x + 1)
|
||||||
break
|
else:
|
||||||
|
break
|
||||||
asyncio.create_task(log_ring_worker())
|
asyncio.create_task(log_ring_worker())
|
||||||
await asyncio.gather(*(_start_app(app) for app in apps), slave.start())
|
await asyncio.gather(*(_start_app(app) for app in apps), slave.start())
|
||||||
await idle()
|
await idle()
|
||||||
|
|
Loading…
Reference in New Issue