- Notifications
You must be signed in to change notification settings - Fork5.7k
Description
Issue I am facing
Hello,
I am facing difficulty in keeping conversations active between multiple processes for the same bot. I created a data persistence based on the BasePersistence class.,
And it works well for most of the methods, such as: get_...data(...), update...data(...) and refresh...data(...). This works well because it has the refresh..._data(...) method that is called always before a handler is executed and then the data in memory is synchronized with the data in the Data Store (Database).
And the limitation I faced was that there is no refresh_conversation_data(...) method to synchronize the local data in memory with the database and so it is not possible to keep the data synchronized between more than one process.
I run my bot in webhook mode, and there the webhook requests are distributed among processes for the same bot. (Hence the need for multiple processes).
Is there any reason not to have the refresh_conversation_data(...) method?
Traceback to the issue
No response
Related part of your code
No response
Operating System
Ubuntu 22.04.4 LTS
Version of Python, python-telegram-bot & dependencies
Bot API 6.6Python 3.10.13 (main, Sep 5 2023, 06:03:44) [GCC 11.4.0]