We are running a django web application via Gunicorn + NGNIX (on a linux server). We find that the jobs we are executing via APScheduler are being executed 3 times each (which is undesirable). We solved the problem on our local computers, however, the problem remains when being run via Gunicorn.
This was the most informative thread: Make sure only one worker launches the apscheduler event in a pyramid web app running multiple workers
Our problem is that we want to execute the following code: env/bin/gunicorn module_containing_app:app -b 0.0.0.0:8080 --workers 3 --preload
, we are unsure about two things:
- We have a domain "
example.com
", should this be taken into consideration? - We are trying to find the
env/bin/gunicorn
folder/path with no luck. We are also trying to understand what to replacemodule_containing_app:app
with because of this.