From 563f5ade695c2d975c91fdbd8aa665f44b0aaba5 Mon Sep 17 00:00:00 2001 From: Dmitry Afanasyev Date: Sat, 20 Aug 2022 02:46:01 +0300 Subject: [PATCH] add async queue --- app/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/main.py b/app/main.py index a11200c..4a8edc3 100644 --- a/app/main.py +++ b/app/main.py @@ -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: