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
Handle SystemExit
raised in Handlers
#4157
Merged
Merged
Changes from 16 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
0c27c50
PoC for handling systemexit beter
Bibo-Joshi fb188fe
Rework `_updater_fetcher`
Bibo-Joshi 9760bdd
Merge branch 'master' into handle-system-exit
Bibo-Joshi a690fcc
Better shutdown in `__run`
Bibo-Joshi 95c98ff
Support calling `Application.stop_running` within `Application.post_i…
Bibo-Joshi 980a99e
Add a test for `post_init`
Bibo-Joshi 3640255
Merge branch 'master' into handle-system-exit
Bibo-Joshi 5fc0ac5
Merge branch 'master' into handle-system-exit
Bibo-Joshi f011c60
Improve a docstring
Bibo-Joshi 5fb5b75
Do the tests. let's pray they pass …
Bibo-Joshi b9d5250
Merge branch 'master' into handle-system-exit
Bibo-Joshi dc45cb0
Merge branch 'master' into handle-system-exit
Bibo-Joshi a60b7d3
Remove all non-failing tests to see if that does something
Bibo-Joshi 5af59ef
Revert "Remove all non-failing tests to see if that does something"
Bibo-Joshi e675a43
Update telegram/ext/_application.py
Bibo-Joshi e7c74b9
review
Bibo-Joshi a578829
Merge branch 'master' into handle-system-exit
Bibo-Joshi 4481b9c
Update telegram/ext/_application.py
Bibo-Joshi File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.. |app_run_shutdown| replace:: The app will shut down when :exc:`KeyboardInterrupt` or :exc:`SystemExit` is raised. This also works from within handlers, error handlers and jobs. However, using :meth:`~telegram.ext.Application.stop_running` will give a somewhat cleaner shutdown behavior than manually raising those exceptions. On unix, the app will also shut down on receiving the signals specified by |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need this again here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in case the app is stopped & restartet during the lifetime of the python script, we need to reset the marker. otherwise the second startup will immediately shut down as well