mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
fix(fastapi): use metrics in cases where PROMETHEUS_MULTIPROC_DIR is defined
Previously, we restricted this to gunicorn to get it working on aur-dev. This change makes it usable through any backend, and also no-op if PROMETHEUS_MULTIPROC_DIR is not defined. Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
cdb854259a
commit
9aa8decf40
3 changed files with 7 additions and 3 deletions
|
@ -22,6 +22,9 @@ while [ $# -ne 0 ]; do
|
|||
esac
|
||||
done
|
||||
|
||||
rm -rf $PROMETHEUS_MULTIPROC_DIR
|
||||
mkdir -p $PROMETHEUS_MULTIPROC_DIR
|
||||
|
||||
# Initialize the new database; ignore errors.
|
||||
python -m aurweb.initdb 2>/dev/null || \
|
||||
(echo "Error: aurweb.initdb failed; already initialized?" && /bin/true)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue