Roald87 / GraceDB

Telegram bot which you can use to get information on gravitational wave events from LIGO/Virgo.
Apache License 2.0
7 stars 0 forks source link

Use `async_task` decorator from Dispatcher for handler with long timeouts #7

Closed Roald87 closed 4 years ago

Roald87 commented 5 years ago
/root/venvs/gracedb/lib/python3.7/site-packages/aiogram/dispatcher/webhook.py:206: TimeoutWarning: Detected slow response into webhook. (Greater than 55 seconds)
Recommended to use 'async_task' decorator from Dispatcher for handler with long timeouts.
  TimeoutWarning)
Roald87 commented 5 years ago

Due to this bug no alert was send out for event S190720a.

That was probably due to some users which blocked the bot and that exception was not handled back then.

Roald87 commented 5 years ago

Adding @dp.async_task before async def send_preliminary(message: types.Message) in main.py doesn't work. I.e. the warning still shows up. Maybe because update_all_events is not asynchronous?