aiogram: Polling doesn't stop on receiving SIGTERM in Docker
I have been using docker for a while and I have noticed 10 second delay before stopping the container. Now I realized that it is because aiogram doesn’t shutdown when SIGTERM signal was sent. When do docker kill --signal SIGINT
, everything looks normal now.
Is it possible to make aiogram to shutdown on SIGTERM as well?
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 15 (6 by maintainers)
Commits related to this issue
- Остановка бота по SIGINT, а не SIGTERM (см. https://github.com/aiogram/aiogram/issues/591) — committed to MasterGroosha/telegram-feedback-bot by MasterGroosha 3 years ago
- Остановка бота по SIGINT, а не SIGTERM (см. https://github.com/aiogram/aiogram/issues/591) — committed to xpavlus/tg-bot-feedback by MasterGroosha 3 years ago
@kamikazebr yes, I have already deleted the bot after 2days
Solved the problem by setting handlers myself
Btw this issue happens only in docker 🤔
https://asciinema.org/a/tLyPYlfnexaL9bFrI7HPw0wjh