summaryrefslogtreecommitdiff
path: root/sublab_project
diff options
context:
space:
mode:
authorMarkus Zapke-Grùˆndemann <markus@keimlink.de>2012-02-08 19:59:22 +0100
committerMarkus Zapke-Grùˆndemann <markus@keimlink.de>2012-02-08 19:59:22 +0100
commit7d96ecbe3054c3a913cc401fa13fe54aa376598c (patch)
treebf0ed106cc00c0d02fe616ed367627d57e3f441f /sublab_project
parent7090b824f3cdc11dc918b252654808d4f3bfc880 (diff)
introduce django-supervisor
Diffstat (limited to 'sublab_project')
-rw-r--r--sublab_project/settings.py1
-rw-r--r--sublab_project/supervisord.conf33
2 files changed, 34 insertions, 0 deletions
diff --git a/sublab_project/settings.py b/sublab_project/settings.py
index 664a7d3..8eeb475 100644
--- a/sublab_project/settings.py
+++ b/sublab_project/settings.py
@@ -144,6 +144,7 @@ INSTALLED_APPS = (
'sublab_monitor',
'flatblocks',
'matekarte',
+ 'djsupervisor'
)
# A sample logging configuration. The only tangible logging
diff --git a/sublab_project/supervisord.conf b/sublab_project/supervisord.conf
new file mode 100644
index 0000000..c940dfd
--- /dev/null
+++ b/sublab_project/supervisord.conf
@@ -0,0 +1,33 @@
+[program:gunicorn]
+command={{ PYTHON }} {{ PROJECT_DIR }}/manage.py run_gunicorn
+{% if settings.DEBUG %}
+exclude=true
+{% endif %}
+
+{% if not settings.DEBUG %}
+[program:runserver]
+exclude=true
+{% endif %}
+
+[program:celeryd]
+{% if settings.DEBUG %}
+command={{ PYTHON }} {{ PROJECT_DIR }}/manage.py celeryd -E --loglevel=INFO
+{% else %}
+command={{ PYTHON }} {{ PROJECT_DIR }}/manage.py celeryd -E
+{% endif %}
+directory={{ PROJECT_DIR }}
+numprocs=1
+startsecs=5
+; Need to wait for currently executing tasks to finish at shutdown.
+; Increase this if you have very long running tasks.
+stopwaitsecs = 600
+
+[program:celerycam]
+command={{ PYTHON }} {{ PROJECT_DIR }}/manage.py celerycam
+
+[program:redis]
+{% if settings.DEBUG %}
+command=redis-server
+{% else %}
+command=redis-server
+{% endif %}