Replies: 1 comment 1 reply
-
Never used it before but I think that https://github.com/encode/broadcaster solves your problem. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am trying to store a list of active websocket connections so that I can send them all a message when a model object is created. In development, this works fine - I have an empty list at the top of my websocket.py file, when a websocket.connect event occurs, I append the send to the list, and then remove it when websocket.disconnect occurs.
However this list does not seem to store properly in production (from google searching, this is due to multiple processes I think). I looked at trying to cache the send event, or save it to a model, but I get a pickl error when trying to do that.
Is there a "best way" to achieve this within the cookiecutter-django framework?
Thanks for any help anyone can offer!
Beta Was this translation helpful? Give feedback.
All reactions