2014-10-06 16:51:50 +04:00
|
|
|
#!/bin/bash
|
2014-11-03 20:20:00 +03:00
|
|
|
|
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
# file, you can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
|
2015-04-15 17:59:39 +03:00
|
|
|
SRC_DIR=$(dirname "$(dirname "${BASH_SOURCE[0]}")")
|
|
|
|
cd $SRC_DIR
|
|
|
|
|
2015-04-15 19:13:55 +03:00
|
|
|
PROJECT_ROOT=$(readlink -f ../)
|
|
|
|
PATH=$PROJECT_ROOT/venv/bin:$PATH
|
|
|
|
|
2014-10-06 16:51:50 +04:00
|
|
|
source /etc/profile.d/treeherder.sh
|
|
|
|
|
|
|
|
if [[ ${NEW_RELIC_LICENSE_KEY+isset} = isset ]]; then
|
|
|
|
NEWRELIC_ADMIN="newrelic-admin run-program"
|
|
|
|
fi
|
|
|
|
|
|
|
|
LOGFILE=/var/log/celery/celery_worker_buildapi.log
|
|
|
|
|
|
|
|
if [ ! -f $LOGFILE ]; then
|
|
|
|
touch $LOGFILE
|
|
|
|
fi
|
|
|
|
|
2015-05-21 17:44:58 +03:00
|
|
|
exec $NEWRELIC_ADMIN celery -A treeherder worker -Q buildapi_pending,buildapi_running,buildapi_4hr \
|
2014-10-06 16:51:50 +04:00
|
|
|
--concurrency=5 --logfile=$LOGFILE -l INFO \
|
2014-11-27 19:52:38 +03:00
|
|
|
--maxtasksperchild=20 -n buildapi.%h
|
2014-10-10 20:46:05 +04:00
|
|
|
|