Skip to content
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

Make updates persist even on DispatcherHandlerStop #1463

Merged
merged 1 commit into from
Aug 23, 2019
Merged

Make updates persist even on DispatcherHandlerStop #1463

merged 1 commit into from
Aug 23, 2019

Conversation

Bibo-Joshi
Copy link
Member

Raising a DispatcherHandlerStop prevents handlers in other groups from being executed. Due to the construction of process_update in the Dispatcher, the update is not persisted in that case, since line 334 is not executed.

This is usually no problem, since all data is persisted on showtdown (from the Updater). However, when trying to acces the persisted files between updates or when a clean shutdown fails, this is an issue.

Hence, persistence should be handled also in line 352.

To avoid copy-pasting, I added a local method for handling the persistence and inserted it at both line 334 and 352.

@tsnoam tsnoam merged commit 5e90231 into python-telegram-bot:master Aug 23, 2019
@Bibo-Joshi Bibo-Joshi deleted the persist-dp-stop branch August 26, 2019 14:46
@github-actions github-actions bot locked and limited conversation to collaborators Aug 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants