зеркало из https://github.com/mozilla/treeherder.git
29 строки
814 B
Bash
Executable File
29 строки
814 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# 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/.
|
|
|
|
SRC_DIR=$(dirname "$(dirname "${BASH_SOURCE[0]}")")
|
|
cd $SRC_DIR
|
|
|
|
PROJECT_ROOT=$(readlink -f ../)
|
|
PATH=$PROJECT_ROOT/venv/bin:$PATH
|
|
|
|
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.log
|
|
|
|
if [ ! -f $LOGFILE ]; then
|
|
touch $LOGFILE
|
|
fi
|
|
|
|
exec $NEWRELIC_ADMIN celery -A treeherder worker -c 3 \
|
|
-Q default,process_objects,cycle_data,calculate_eta,populate_performance_series,fetch_bugs \
|
|
-E --maxtasksperchild=500 \
|
|
--logfile=$LOGFILE -l INFO -n default.%h
|