treeherder/bin/run_celery_worker

27 строки
604 B
Plaintext
Исходник Обычный вид История

2014-01-06 19:49:32 +04:00
#!/bin/bash
curr_dir=$( dirname "${BASH_SOURCE[0]}" )
cd $( dirname $curr_dir)
source /etc/profile.d/treeherder.sh
if [[ ${NEW_RELIC_LICENSE_KEY+isset} = isset ]]; then
NEWRELIC_ADMIN="newrelic-admin run-program"
fi
if [ -f ../venv/bin/celery ]; then
2014-05-30 21:29:34 +04:00
source ../venv/bin/activate
CELERY=../venv/bin/celery
else
CELERY=celery
fi
2014-05-30 21:29:34 +04:00
LOGFILE=/var/log/celery/celery_worker.log
2014-05-31 03:24:20 +04:00
if [ ! -f $LOGFILE ]; then
touch $LOGFILE
fi
exec $NEWRELIC_ADMIN $CELERY -A treeherder worker -c 3 \
-Q default,buildapi,pushlog -E --maxtasksperchild=500 \
--logfile=$LOGFILE -l INFO -n default.%h