fix: don't break management commands with prometheus multiproc

This commit is contained in:
Jenny Danzmayr 2024-09-18 02:06:33 +02:00
parent d49dd06f74
commit 1ae228fb31

View file

@ -7,7 +7,6 @@ cd /app
# number of workers for guicorn, we coppy the value of UWSGI_WORKERS if it is not set # number of workers for guicorn, we coppy the value of UWSGI_WORKERS if it is not set
export WEB_CONCURRENCY="${WEB_CONCURRENCY:-$UWSGI_WORKERS}" export WEB_CONCURRENCY="${WEB_CONCURRENCY:-$UWSGI_WORKERS}"
export PROMETHEUS_MULTIPROC_DIR="/tmp/prometheus_multiproc"
automigrate() { automigrate() {
AUTOMIGRATE="${C3NAV_AUTOMIGRATE:no}" AUTOMIGRATE="${C3NAV_AUTOMIGRATE:no}"
@ -18,6 +17,7 @@ automigrate() {
} }
setup_prometheus_multiproc() { setup_prometheus_multiproc() {
export PROMETHEUS_MULTIPROC_DIR="/tmp/prometheus_multiproc"
rm -rf "${PROMETHEUS_MULTIPROC_DIR}" || true rm -rf "${PROMETHEUS_MULTIPROC_DIR}" || true
mkdir "PROMETHEUS_MULTIPROC_DIR" mkdir "PROMETHEUS_MULTIPROC_DIR"
} }