This repository was archived by the owner on Jun 13, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +16
-13
lines changed Expand file tree Collapse file tree 3 files changed +16
-13
lines changed Original file line number Diff line number Diff line change 3131 python manage.py migrate
3232 python manage.py migrate --database " timeseries" timeseries
3333 # Start api
34- ${SUB} $prefix gunicorn codecov.wsgi:application --workers=$GUNICORN_WORKERS --bind ${CODECOV_API_BIND:- 0.0.0.0} :${CODECOV_API_PORT:- 8000} --access-logfile ' -' ${statsd} --timeout " ${GUNICORN_TIMEOUT:- 600} " ${POST}
34+ ${SUB} $prefix gunicorn codecov.wsgi:application --workers=$GUNICORN_WORKERS --threads= ${GUNICORN_THREADS :- 1} --worker-connections= ${GUNICORN_WORKER_CONNECTIONS :- 1000} -- bind ${CODECOV_API_BIND:- 0.0.0.0} :${CODECOV_API_PORT:- 8000} --access-logfile ' -' ${statsd} --timeout " ${GUNICORN_TIMEOUT:- 600} " ${POST}
3535elif [[ " $1 " = " rti" ]];
3636then
3737 # Start api
Original file line number Diff line number Diff line change @@ -7,8 +7,12 @@ if [ -f "/usr/local/bin/berglas" ]; then
77 prefix=" berglas exec --"
88fi
99
10- export PROMETHEUS_MULTIPROC_DIR=" ${PROMETHEUS_MULTIPROC_DIR:- $HOME / .prometheus} "
11- rm -r ${PROMETHEUS_MULTIPROC_DIR?} /* 2> /dev/null
12- mkdir -p " $PROMETHEUS_MULTIPROC_DIR "
10+ GUNICORN_WORKERS=${GUNICORN_WORKERS:- 2}
11+ if [ " $GUNICORN_WORKERS " -gt 1 ];
12+ then
13+ export PROMETHEUS_MULTIPROC_DIR=" ${PROMETHEUS_MULTIPROC_DIR:- $HOME / .prometheus} "
14+ rm -r ${PROMETHEUS_MULTIPROC_DIR?} /* 2> /dev/null
15+ mkdir -p " $PROMETHEUS_MULTIPROC_DIR "
16+ fi
1317
14- $prefix gunicorn codecov.wsgi:application --workers=2 --bind 0.0.0.0:8000 --access-logfile ' -' --statsd-host ${STATSD_HOST} :${STATSD_PORT} --timeout " ${GUNICORN_TIMEOUT:- 600} "
18+ $prefix gunicorn codecov.wsgi:application --workers=${GUNICORN_WORKERS} --threads= ${GUNICORN_THREADS :- 1} --worker-connections= ${GUNICORN_WORKER_CONNECTIONS :- 1000} -- bind 0.0.0.0:8000 --access-logfile ' -' --statsd-host ${STATSD_HOST} :${STATSD_PORT} --timeout " ${GUNICORN_TIMEOUT:- 600} " --disable-redirect-access-to-syslog --max-requests=50000 --max-requests-jitter=300
Original file line number Diff line number Diff line change @@ -8,13 +8,12 @@ prefix=""
88if [ -f " /usr/local/bin/berglas" ]; then
99 prefix=" berglas exec --"
1010fi
11- suffix=" "
12- if [[ " $STATSD_HOST " ]]; then
13- suffix=" --statsd-host ${STATSD_HOST} :${STATSD_PORT} "
14- fi
1511
16- export PROMETHEUS_MULTIPROC_DIR=" ${PROMETHEUS_MULTIPROC_DIR:- $HOME / .prometheus} "
17- rm -r ${PROMETHEUS_MULTIPROC_DIR?} /* 2> /dev/null
18- mkdir -p " $PROMETHEUS_MULTIPROC_DIR "
12+ if [ " $GUNICORN_WORKERS " -gt 1 ];
13+ then
14+ export PROMETHEUS_MULTIPROC_DIR=" ${PROMETHEUS_MULTIPROC_DIR:- $HOME / .prometheus} "
15+ rm -r ${PROMETHEUS_MULTIPROC_DIR?} /* 2> /dev/null
16+ mkdir -p " $PROMETHEUS_MULTIPROC_DIR "
17+ fi
1918
20- $prefix gunicorn codecov.wsgi:application --reload --workers=2 --bind 0.0.0.0:8000 --access-logfile ' -' --timeout " ${GUNICORN_TIMEOUT:- 600} " $suffix
19+ $prefix gunicorn codecov.wsgi:application --reload --workers=${GUNICORN_WORKERS :- 2} --threads= ${GUNICORN_THREADS :- 1} --worker-connections= ${GUNICORN_WORKER_CONNECTIONS :- 1000} -- bind 0.0.0.0:8000 --access-logfile ' -' --timeout " ${GUNICORN_TIMEOUT:- 600} " --disable-redirect-access-to-syslog --config=gunicorn.conf.py
You can’t perform that action at this time.
0 commit comments