1

I'm currently am trying to use Celery to send sockets with django channels. However I found the same issue there as with using Django's shell, and was hoping if someone could enlighten me.

I have it set up so that within views.py, when a user sends a POST request it will call

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

The browser then displays an alert.

However when I try to do the same thing using Django's shell or one of Celery's tasks:

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

It doesn't do anything, not even returning an error.

1 Answer 1

1

If you are using In-Memory Channel Layer then likely it does not support cross-process communication. So try with other channel layer types and you are good to go.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.