add async queue

This commit is contained in:
Dmitry Afanasyev 2022-08-20 02:46:01 +03:00
parent 5e3676cd5e
commit 563f5ade69

View File

@ -97,10 +97,10 @@ async def worker() -> None:
Bot.set_current(dispatcher.bot)
while True:
await asyncio.sleep(1)
update = await queue.get()
logger.warning(f"Get update {update}")
await dispatcher.process_update(update)
await asyncio.sleep(1)
async def create_app() -> web.Application: