-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bot fails to gracefully shut down #2
Comments
This is most likely due to a plugin starting a thread and not stopping it when the bot shuts down. Python won't force background threads to exit when the main thread exits. |
https://docs.python.org/3/library/threading.html#threading.Thread.daemon Why not set all plugins as daemon threads? The only downside is lock or any other operation the thread might be doing. |
Mostly because the bot was written with 2.7 in mind. At the time, python 3 wasn't a viable choice for our environment, and bot frameworks at the time were written for python 3. Additionally, existing frameworks didn't handle saving their config+state to anywhere other than local storage, which was a non-starter for the project. Given python 2.7 is going away soon, everything should be python 3 anyways, and there are much better bot frameworks for python 3 than this one, I'm not sure how much time you would want to spend on rewriting the plugin system. |
Add link_names option to send_message, fix tests
This issue is now resolved and we have not seen this issue after the python 3 rewrite and fixes that @amckenna-pinterest did. |
The bot does not necessarily shut down gracefully. Here is an example from when reconnection after Slack team migration fails.
After this, the docker container was not shut down, circumventing automatic restart.
The text was updated successfully, but these errors were encountered: