treeherder/bin/run_celerybeat

18 строки
342 B
Bash
Executable File

#!/bin/bash
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
LOGFILE=/var/log/celery/celerybeat.log
if [ ! -f $LOGFILE ]; then
touch $LOGFILE
fi
exec newrelic-admin run-program celery -A treeherder beat -f $LOGFILE