2014-01-06 19:49:32 +04:00
|
|
|
#!/bin/bash
|
2014-11-03 20:20:00 +03:00
|
|
|
|
2015-04-15 17:59:39 +03:00
|
|
|
SRC_DIR=$(dirname "$(dirname "${BASH_SOURCE[0]}")")
|
|
|
|
cd $SRC_DIR
|
2014-01-08 01:28:48 +04:00
|
|
|
|
2015-04-15 19:13:55 +03:00
|
|
|
PROJECT_ROOT=$(readlink -f ../)
|
|
|
|
PATH=$PROJECT_ROOT/venv/bin:$PATH
|
|
|
|
|
2014-05-31 03:09:11 +04:00
|
|
|
source /etc/profile.d/treeherder.sh
|
2014-05-20 19:57:13 +04:00
|
|
|
|
2014-05-31 03:09:11 +04:00
|
|
|
if [[ ${NEW_RELIC_LICENSE_KEY+isset} = isset ]]; then
|
2014-05-20 19:57:13 +04:00
|
|
|
NEWRELIC_ADMIN="newrelic-admin run-program"
|
2014-05-31 03:09:11 +04:00
|
|
|
fi
|
2014-05-20 19:57:13 +04:00
|
|
|
|
2014-05-31 03:09:11 +04:00
|
|
|
LOGFILE=/var/log/celery/celery_worker.log
|
|
|
|
|
2014-05-31 03:24:20 +04:00
|
|
|
if [ ! -f $LOGFILE ]; then
|
2014-05-31 03:09:11 +04:00
|
|
|
touch $LOGFILE
|
|
|
|
fi
|
|
|
|
|
2015-04-15 19:13:55 +03:00
|
|
|
exec $NEWRELIC_ADMIN celery -A treeherder worker -c 3 \
|
2016-01-21 22:02:51 +03:00
|
|
|
-Q default,cycle_data,calculate_durations,fetch_bugs,fetch_allthethings,generate_perf_alerts \
|
2015-01-15 22:02:46 +03:00
|
|
|
-E --maxtasksperchild=500 \
|
2014-10-10 20:46:05 +04:00
|
|
|
--logfile=$LOGFILE -l INFO -n default.%h
|