Title: [QUESTION] How to work with persistent conversation data across multiple processes · Issue #4452 · python-telegram-bot/python-telegram-bot · GitHub
Open Graph Title: [QUESTION] How to work with persistent conversation data across multiple processes · Issue #4452 · python-telegram-bot/python-telegram-bot
X Title: [QUESTION] How to work with persistent conversation data across multiple processes · Issue #4452 · python-telegram-bot/python-telegram-bot
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, suc...
Open Graph 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...
X 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...
Opengraph URL: https://github.com/python-telegram-bot/python-telegram-bot/issues/4452
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[QUESTION] How to work with persistent conversation data across multiple processes","articleBody":"### Issue I am facing\n\n**Hello,**\r\n\r\nI am facing difficulty in keeping conversations active between multiple processes for the same bot. I created a data persistence based on the BasePersistence class.,\r\n\r\nAnd 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).\r\n\r\nAnd 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.\r\n\r\nI 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).\r\n\r\nIs there any reason not to have the refresh_conversation_data(...) method?\n\n### Traceback to the issue\n\n_No response_\n\n### Related part of your code\n\n_No response_\n\n### Operating System\n\nUbuntu 22.04.4 LTS\n\n### Version of Python, python-telegram-bot & dependencies\n\n```shell\nBot API 6.6\r\nPython 3.10.13 (main, Sep 5 2023, 06:03:44) [GCC 11.4.0]\n```\n","author":{"url":"https://github.com/mattewid","@type":"Person","name":"mattewid"},"datePublished":"2024-09-02T15:14:11Z","url":"https://github.com/python-telegram-bot/python-telegram-bot/issues/4452"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:36f11d8c-521d-3cd6-3456-59e59f74f0ea |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 927C:252FE9:70EE1:93866:6B027D9D |
| html-safe-nonce | b45d1ad8ebb39d0a2d146d20126bd55e25b97cb29e093b7cd52d1d5c02034d1d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MjdDOjI1MkZFOTo3MEVFMTo5Mzg2Njo2QjAyN0Q5RCIsInZpc2l0b3JfaWQiOiIzODU5Nzc2Mzg2NDUzNjM0NDYxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 011a24ad338e8b3733d74dafc1bf417979b412922f03ed7d07f3f66cf1951d66 |
| hovercard-subject-tag | issue:2501197543 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-telegram-bot/python-telegram-bot/4452/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3b79461bd158293044db1922cf577390c67c3a3ef005a766c40e7e698327ae22/python-telegram-bot/python-telegram-bot/issues/4452 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3b79461bd158293044db1922cf577390c67c3a3ef005a766c40e7e698327ae22/python-telegram-bot/python-telegram-bot/issues/4452 |
| og:image:alt | 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... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mattewid |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/python-telegram-bot/python-telegram-bot git https://github.com/python-telegram-bot/python-telegram-bot.git |
| octolytics-dimension-user_id | 16178365 |
| octolytics-dimension-user_login | python-telegram-bot |
| octolytics-dimension-repository_id | 38696925 |
| octolytics-dimension-repository_nwo | python-telegram-bot/python-telegram-bot |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 38696925 |
| octolytics-dimension-repository_network_root_nwo | python-telegram-bot/python-telegram-bot |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width