just was not configured properly for celery

pull/1/head
Raymond Yee 2014-10-10 17:00:28 -07:00
parent ce78b441e3
commit 9be8d2b3a7
3 changed files with 51 additions and 0 deletions

View File

@ -0,0 +1,36 @@
# http://docs.celeryproject.org/en/latest/cookbook/daemonizing.html#generic-initd-celerybeat-example
# to be placed at /etc/defaults/celerybeat
# Where to chdir at start.
CELERYBEAT_CHDIR="/opt/regluit/"
# Extra arguments to celerybeat
#CELERYBEAT_OPTS="--schedule=/var/run/celerybeat-schedule"
# Name of the celery config module.#
CELERY_CONFIG_MODULE="celeryconfig"
# Name of the projects settings module.
export DJANGO_SETTINGS_MODULE="regluit.settings.just"
# Path to celerybeat
CELERYBEAT="/opt/regluit/ENV/bin/django-admin.py celerybeat"
# virtualenv to use
VIRTUALENV="/opt/regluit/ENV"
#Full path to the PID file. Default is /var/run/celeryd.pid
CELERYBEAT_PIDFILE="/var/log/celerybeat/celerybeat.pid"
#Full path to the celeryd log file. Default is /var/log/celeryd.log
CELERYBEAT_LOGFILE="/var/log/celerybeat/celerybeat.log"
#Log level to use for celeryd. Default is INFO.
CELERYBEAT_LOG_LEVEL="INFO"
#User to run celeryd as. Default is current user.
#CELERYBEAT_USER
#Group to run celeryd as. Default is current user.
#CELERYBEAT_GROUP

11
deploy/celeryd_just.conf Normal file
View File

@ -0,0 +1,11 @@
CELERYD_NODES="w1"
CELERYD_CHDIR="/opt/regluit/"
CELERYD_LOG_FILE="/var/log/celery/%n.log"
CELERYD_PID_FILE="/var/log/celery/%n.pid"
CELERYD_USER="celery"
CELERYD_GROUP="celery"
CELERYD="/opt/regluit/ENV/bin/django-admin.py celeryd"
CELERYD_MULTI="/opt/regluit/ENV/bin/django-admin.py celeryd_multi"
VIRTUALENV_ACTIVATE="/opt/regluit/ENV/bin/activate"
export DJANGO_SETTINGS_MODULE="regluit.settings.just"

View File

@ -12,6 +12,10 @@ source ENV/bin/activate
pip install -r requirements_versioned.pip
django-admin.py syncdb --migrate --settings regluit.settings.just
django-admin.py collectstatic --noinput --settings regluit.settings.just
sudo ln -s deploy/celeryd_just.conf /etc/default/celeryd
sudo ln -s deploy/celerybeat_just /etc/init.d/celerybeat
sudo /etc/init.d/apache2 restart
sudo /etc/init.d/celeryd restart
sudo /etc/init.d/celerybeat restart