python - Django Channels using django shell -


i'm trying use celery send sockets django channels. found same issue there using django's shell, , hoping if enlighten me.

i have set within views.py, when user sends post request call

group("chat").send({'text':'hello'}) 

the browser displays alert.

however when try same thing using django's shell or 1 of celery's tasks:

$ python3 manage.py shell $ channels import group $ group("chat").send({'text': 'hello'}) 

it doesn't anything, not returning error.

if using in-memory channel layer it not support cross-process communication. try other channel layer types , go.


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -