Hi,
I am trying to run django-q2 and django-channels together but it fails.
Everything only works fine with qcluster in sync mode (sync=True)
My chain calls:
Regular django app -> async_task with hook -> hook that send channels message.
Any thoughts what can be wrong?
# asycn_task
def create_auto_snapshot(grid_uid: str):
# do some work with django orm
return new_grid_uid
# hook called from task
def hook_create_auto_snapshot(task):
grid_uid = task.result
# Send notification to all clients in the group
channel_layer = get_channel_layer()
channel_group_name = f"grid_group_{grid_uid}"
async_to_sync(channel_layer.group_send)(
channel_group_name,
{"type": "send_notification"},
)
Hi, I am trying to run django-q2 and django-channels together but it fails. Everything only works fine with qcluster in sync mode (sync=True)
My chain calls: Regular django app -> async_task with hook -> hook that send channels message.
Any thoughts what can be wrong?