I am running a Django application on the App Platform which features a main web service. Additionally, I want a separate process to run some scheduled tasks with Django-Q2.
I have managed to get everything running by attaching a worker server to my web service, and then manually typing my desired run command in the control panel UI.
However, I have two questions:
Is there any way to run these two in the same main web service, in different processes? I know this isn’t scalable, but I’m in the development stage and I don’t see the point in spending an extra $12 for the worker
Is there any way to declare this in the Procfile?
My Procfile is as follows:
web: python manage.py migrate && gunicorn --worker-tmp-dir /dev/shm config.wsgi:application worker: python manage.py schedule_tasks && python manage.py qcluster
Web runs OK, but worker doesn’t.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Sign up for Infrastructure as a Newsletter.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
You ever figure this out?