Passing data from consumer to channel layer used outside in another script #2069
Replies: 1 comment
-
Duplicate post from Django Forum |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am looking for a way to pass extra data from WS subscription to be used later using channel layer Using outside of consumers.
My use case is:
{'model': 'App.Model', 'a': 'b'}
await self.channel_layer.group_add(app_model, self.channel_name)
I need to pass
a=b
somehow from the consumer, so I can use it in the broadcasting job, apparently there's no way to do so, since storing the variable inscope
isn't accessible outside the consumer. Also there's no way to check if a group name exists, so I can set group name toApp.Model_b
and check for it later.Beta Was this translation helpful? Give feedback.
All reactions