From 9ec3b3648b4d282abb5e352777d7257426ed5b39 Mon Sep 17 00:00:00 2001 From: Guba Sándor Date: Mon, 6 Oct 2014 09:48:53 +0200 Subject: [PATCH] miscellaneous: purge queues on startup --- miscellaneous/mancelery.conf | 7 ++++++- miscellaneous/moncelery.conf | 5 ++++- miscellaneous/slowcelery.conf | 10 ++++++++-- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/miscellaneous/mancelery.conf b/miscellaneous/mancelery.conf index a6f63c6..e3dd802 100644 --- a/miscellaneous/mancelery.conf +++ b/miscellaneous/mancelery.conf @@ -6,9 +6,14 @@ respawn limit 30 30 setgid cloud setuid cloud +kill timeout 360 +kill signal SIGTERM + script cd /home/cloud/circle/circle . /home/cloud/.virtualenvs/circle/bin/activate . /home/cloud/.virtualenvs/circle/bin/postactivate - exec ./manage.py celery --app=manager.mancelery worker --autoreload --loglevel=info --hostname=mancelery -B -c 10 + ./manage.py celery -f --app=manager.mancelery purge + exec ./manage.py celery --app=manager.mancelery worker --autoreload --loglevel=info --hostname=mancelery -B -c 3 end script + diff --git a/miscellaneous/moncelery.conf b/miscellaneous/moncelery.conf index ca00325..7c107c1 100644 --- a/miscellaneous/moncelery.conf +++ b/miscellaneous/moncelery.conf @@ -3,6 +3,7 @@ description "CIRCLE moncelery for monitoring jobs" respawn respawn limit 30 30 + setgid cloud setuid cloud @@ -10,5 +11,7 @@ script cd /home/cloud/circle/circle . /home/cloud/.virtualenvs/circle/bin/activate . /home/cloud/.virtualenvs/circle/bin/postactivate - exec ./manage.py celery --app=manager.moncelery worker --autoreload --loglevel=info --hostname=moncelery -B -c 3 + ./manage.py celery -f --app=manager.moncelery purge + exec ./manage.py celery --app=manager.moncelery worker --autoreload --loglevel=info --hostname=moncelery -B -c 2 end script + diff --git a/miscellaneous/slowcelery.conf b/miscellaneous/slowcelery.conf index b4fdc75..e8c16c1 100644 --- a/miscellaneous/slowcelery.conf +++ b/miscellaneous/slowcelery.conf @@ -1,4 +1,4 @@ -description "CIRCLE mancelery for slow jobs" +description "CIRCLE slowcelery for resource intensive or long jobs" respawn respawn limit 30 30 @@ -6,9 +6,15 @@ respawn limit 30 30 setgid cloud setuid cloud +kill timeout 360 +kill signal INT + + script cd /home/cloud/circle/circle . /home/cloud/.virtualenvs/circle/bin/activate . /home/cloud/.virtualenvs/circle/bin/postactivate - exec ./manage.py celery --app=manager.slowcelery worker --autoreload --loglevel=info --hostname=slowcelery -B -c 5 + ./manage.py celery -f --app=manager.slowcelery purge + exec ./manage.py celery --app=manager.slowcelery worker --autoreload --loglevel=info --hostname=slowcelery -B -c 1 end script + -- libgit2 0.26.0