all tasks to loop not queue

This commit is contained in:
Dmitry Afanasyev 2022-08-21 23:05:20 +03:00
parent 59d1b98d34
commit 95af779729

View File

@ -27,7 +27,8 @@ queue = asyncio.Queue() # type: ignore
async def bot_startup() -> None:
await bot.set_webhook(WEBHOOK_URL)
asyncio.create_task(get_updates_from_queue())
loop = asyncio.get_running_loop()
loop.create_task(get_updates_from_queue())
logger.info(f'Webhook set to {WEBHOOK_URL}'.replace(API_TOKEN, '{BOT_API_TOKEN}'))
asyncio_schedule()