I'm trying to implement a custom management command into my app.
its purpose would be to check the database for a poll which fits time parameters and update clients via channels.
I want to get a list of the clients in a group, then decide whether or not to send them new information based on their session data
I have been exploring this in the shell and im wondering why my client doesn't receive a message when i use the following code:
from django.conf import settings
from django.utils.module_loading import import_string
config = getattr(settings, "CHANNEL_LAYERS", {})
backend_class = import_string(config['default']['BACKEND'])
channel_layer = backend_class(config['default'].get("CONFIG", {}))
channel = channel_layer.group_channels('poll')[0]
channel_layer.send(channel, {"text": "hello world!"})