You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 5, 2020. It is now read-only.
I'm experiencing a very similar problem to this one in my Django Development/Testing environment with the following configuration:
# settings.pyCHANNEL_LAYERS= {
"default": {
# This example app uses the Redis channel layer implementation# asgi_inmemory"BACKEND": "asgiref.inmemory.ChannelLayer",
"ROUTING": "mytest.routing.channel_routing",
},
}
My Problem: A scheduled (Celery) task can not send a web socket request through channels. However, it works great in views and other locations. The symptoms are present both with the immediately=True setting and without it. There is no error or anything; the web socket request is just simply not passed along. However having a signal generated from within a model/view works awesome (so i know my setup is good - or so i think).
# from within a celery task (this will just silently fail and not fire to the client):Group("test").send({
"text": json.dumps({
'type': 'test',
})
}, immediately=True)
# nothing gets sent to the user at this point
I'm launching a celery worker (before starting Django) like so:
Oh, wait, I've just seen you are using the inmemory channel layer - this does not work between processes (and you've also got the wrong repo anyway). Switch to the IPC or Redis layers and you'll be able to talk between processes.
I'm experiencing a very similar problem to this one in my Django Development/Testing environment with the following configuration:
My Problem: A scheduled (Celery) task can not send a web socket request through channels. However, it works great in views and other locations. The symptoms are present both with the immediately=True setting and without it. There is no error or anything; the web socket request is just simply not passed along. However having a signal generated from within a model/view works awesome (so i know my setup is good - or so i think).
I'm launching a celery worker (before starting Django) like so:
Was just curious if there was something i was missing here? My package versions are:
Any help and/or advice would be most welcome!
The text was updated successfully, but these errors were encountered: