Closed HK-Mattew closed 2 months ago
Hi. There is no specific reason not to have refresh_conversation_data
. AFAIK ConversationHandler
are just rarely used in load balancing/serverless setups, at least I have only seen a hand full of questions about this. I've added your point to #2770. I'm aware that this only of little benefit for you as #2770 has been on our list since ages, but at the current point I don't see us adding significant new functionality to CH …
Olá. Não há nenhuma razão específica para não ter
refresh_conversation_data
. AFAIKConversationHandler
são raramente usados em balanceamento de carga/configurações sem servidor, pelo menos eu só vi uma pergunta sobre isso. Adicionei seu ponto ao #2770 . Estou ciente de que isso só traz pouco benefício para você, pois o #2770 está em nossa lista há séculos, mas no momento atual não vejo que estamos adicionando novas funcionalidades específicas ao CH …
Got it, I'll follow the discussion. Thanks.
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