Channels: Allow configuration of what channels workers listen on

Created on 4 Apr 2016  路  5Comments  路  Source: django/channels

Suggested that it's an argument to runworker where the user can provide multiple arguments, or a glob string that's expanded against the available set.

Most helpful comment

runworker now has --only-channels and --exclude-channels options, e.g.:

`python manage.py runworker --only-channels=http.* --only-channels=websocket.*`

All 5 comments

This seems quite important, if there are ANY consumers that have long running tasks (lets say some minutes or even hours). Once you have more of those tasks than running worker instances/processes wouldn麓t it completely kill the frontend?

Yes, that's correct, though generally putting long-running things in Channels should be discouraged, I should update the docs to reflect that. I plan to get this in soon.

The first senteces of the documentation (In Short) say:

  • Background tasks, running in the same servers as the rest of Django

Are you planning to document that its not supported or is worker/channel selection generally on the roadmap?

They are supported, just only on the order of seconds in the current configuration. Channel restrictions for runworker are incoming.

runworker now has --only-channels and --exclude-channels options, e.g.:

`python manage.py runworker --only-channels=http.* --only-channels=websocket.*`
Was this page helpful?
0 / 5 - 0 ratings