From 5c9baaf0c9972d5e0bae78a8256f78ce9c36d242 Mon Sep 17 00:00:00 2001 From: Michael Herman Date: Tue, 7 Jul 2015 23:21:17 -0600 Subject: [PATCH] added supervisor files --- supervisor/picha_celery.conf | 52 ++++++++++++++++++++++++++++++++ supervisor/picha_celerybeat.conf | 43 ++++++++++++++++++++++++++ 2 files changed, 95 insertions(+) create mode 100644 supervisor/picha_celery.conf create mode 100644 supervisor/picha_celerybeat.conf diff --git a/supervisor/picha_celery.conf b/supervisor/picha_celery.conf new file mode 100644 index 0000000..5cacb80 --- /dev/null +++ b/supervisor/picha_celery.conf @@ -0,0 +1,52 @@ +; ================================== +; celery worker supervisor example +; ================================== + +; the name of your supervisord program +[program:pichacelery] + +; Set full path to celery program if using virtualenv +command=/home/mosh/.virtualenvs/picha/bin/celery worker -A picha --loglevel=INFO + +; The directory to your Django project +directory=/home/mosh/sites/picha + +; If supervisord is run as the root user, switch users to this UNIX user account +; before doing any processing. +user=mosh + +; Supervisor will start as many instances of this program as named by numprocs +numprocs=1 + +; Put process stdout output in this file +stdout_logfile=/var/log/celery/picha_worker.log + +; Put process stderr output in this file +stderr_logfile=/var/log/celery/picha_worker.log + +; If true, this program will start automatically when supervisord is started +autostart=true + +; May be one of false, unexpected, or true. If false, the process will never +; be autorestarted. If unexpected, the process will be restart when the program +; exits with an exit code that is not one of the exit codes associated with this +; process’ configuration (see exitcodes). If true, the process will be +; unconditionally restarted when it exits, without regard to its exit code. +autorestart=true + +; The total number of seconds which the program needs to stay running after +; a startup to consider the start successful. +startsecs=10 + +; Need to wait for currently executing tasks to finish at shutdown. +; Increase this if you have very long running tasks. +stopwaitsecs = 600 + +; When resorting to send SIGKILL to the program to terminate it +; send SIGKILL to its whole process group instead, +; taking care of its children as well. +killasgroup=true + +; if your broker is supervised, set its priority higher +; so it starts first +priority=998 \ No newline at end of file diff --git a/supervisor/picha_celerybeat.conf b/supervisor/picha_celerybeat.conf new file mode 100644 index 0000000..666c1a9 --- /dev/null +++ b/supervisor/picha_celerybeat.conf @@ -0,0 +1,43 @@ +; ================================ +; celery beat supervisor example +; ================================ + +; the name of your supervisord program +[program:pichacelerybeat] + +; Set full path to celery program if using virtualenv +command=/home/mosh/.virtualenvs/picha/bin/celerybeat -A picha --loglevel=INFO + +; The directory to your Django project +directory=/home/mosh/sites/picha + +; If supervisord is run as the root user, switch users to this UNIX user account +; before doing any processing. +user=mosh + +; Supervisor will start as many instances of this program as named by numprocs +numprocs=1 + +; Put process stdout output in this file +stdout_logfile=/var/log/celery/picha_beat.log + +; Put process stderr output in this file +stderr_logfile=/var/log/celery/picha_beat.log + +; If true, this program will start automatically when supervisord is started +autostart=true + +; May be one of false, unexpected, or true. If false, the process will never +; be autorestarted. If unexpected, the process will be restart when the program +; exits with an exit code that is not one of the exit codes associated with this +; process’ configuration (see exitcodes). If true, the process will be +; unconditionally restarted when it exits, without regard to its exit code. +autorestart=true + +; The total number of seconds which the program needs to stay running after +; a startup to consider the start successful. +startsecs=10 + +; if your broker is supervised, set its priority higher +; so it starts first +priority=999