I'm using the following with my Django application:
- Django channels
- Celery with both regular and periodic tasks
- Deployed on Heroku
My Procfile looks like this:
web: daphne artist_notify.asgi:channel_layer --port $PORT --bind 0.0.0.0 -v2
worker: python manage.py migrate --noinput && python manage.py runworker -v2
celerybeat: celery -A artist_notify beat -l info
celeryworker: celery -A artist_notify worker -l info
This combination seems to be expensive, and I'm wondering if I can make it better. I tried combining celerybeat
and celeryworker
(with &&
) into one dyno called celery
, like so:
celery: celery -A artist_notify beat -l info && celery -A artist_notify worker -l info
But that doesn't work, although other &&
combinations do work. I'm wondering if I can maybe combine the workers from worker
and celeryworker
?