1

I have a Django webapp. The app has some scheduled tasks, for this I'm using django-q. In local development you need to run manage.py qcluster to be able to run the scheduled tasks.

How can I automatically run the qcluster process in production?

I'm deploying to a Digital Ocean droplet, using ubuntu, nginx and gunicorn.

qwerty000
  • 176
  • 11

1 Answers1

1

Are you using a Procfile?

My configuration is to have a Procfile that contains:

web: python ./manage.py runserver 0.0.0.0:$PORT
worker: python ./manage.py qcluster

This way, every time the web process is started, another process for django-q is also created.

ahchoo
  • 11
  • 5