Skip to content

Conversation

@Bibo-Joshi
Copy link
Member

As user_data and chat_data might be changed between updates (e.g. when storing information from background processes that need to be visible to the user on request), they should be updated before calling flush() on shutdown of the bot. I therefore added the method update_persistence() to the Dispatcher class, that is called from the Updater before flushing on shutdown.
Also, since it will be called on shutdown, flush() should always flush. I therefore edited the method in PicklePersistence to be independent of on_flush.

@jsmnbom jsmnbom requested a review from Eldinnie January 4, 2019 19:29
@jsmnbom jsmnbom added the 📋 pending-review work status: pending-review label Jan 4, 2019
@Bibo-Joshi Bibo-Joshi changed the title Adjust persistence of exit behaviour Adjust persistence on exit behaviour Jan 13, 2019
@Bibo-Joshi
Copy link
Member Author

If #1325 is merged, the new update_persistence method needs to be adjusted to also update bot_data

@jsmnbom
Copy link
Member

jsmnbom commented Feb 13, 2019

As per #1301 I'd love to have this in v12, but I'm not comfortable enough the persistence component yet, so I'll hold off till the author can review or I get more time.
Thanks a whole lot for all your PRs though, it's great to see people helping :)

@jsmnbom jsmnbom added this to the V12 milestone Feb 13, 2019
@Eldinnie
Copy link
Member

Right, good addition!

@Eldinnie
Copy link
Member

I pushed two commits to fix a docstring and add tests. If CI approves it;s good to go

@jsmnbom
Copy link
Member

jsmnbom commented Feb 13, 2019

CI fail unrelated, will fix on master

@jsmnbom jsmnbom merged commit f7abb21 into python-telegram-bot:master Feb 13, 2019
@Bibo-Joshi Bibo-Joshi deleted the persistence-on-exit branch October 18, 2019 09:45
@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

📋 pending-review work status: pending-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants