treeherder/bin/run_celery_worker_log_parser

32 строки
706 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/celery_worker_log_parser.log
if [ ! -f $LOGFILE ]; then
touch $LOGFILE
fi
exec newrelic-admin run-program celery -A treeherder worker \
-Q \
parse_job_logs,\
parse_job_logs_fail,\
log_parser,\
log_parser_fail,\
log_store_failure_lines,\
log_store_failure_lines_fail,\
log_crossreference_error_lines,\
log_crossreference_error_lines_fail,\
log_autoclassify,\
log_autoclassify_fail,\
error_summary\
--concurrency=5 --logfile=$LOGFILE -l INFO \
--maxtasksperchild=500 -n log_parser.%h