Fix initialization of .ui.json file in gunicorn.conf.py and main.py

This commit is contained in:
Théophile Diot 2024-04-24 15:33:03 +02:00
parent f1b32ce26f
commit 0ec7cfb03d
No known key found for this signature in database
GPG key ID: 248FEA4BAE400D06
2 changed files with 3 additions and 3 deletions

View file

@ -110,9 +110,6 @@ def on_starting(server):
def when_ready(server):
if not TMP_DIR.joinpath(".ui.json").is_file():
TMP_DIR.joinpath(".ui.json").write_text("{}", encoding="utf-8")
TMP_DIR.joinpath("ui.pid").write_text(str(getpid()), encoding="utf-8")
TMP_DIR.joinpath("ui.healthy").write_text("ok", encoding="utf-8")

View file

@ -141,6 +141,9 @@ USER_PASSWORD_RX = re_compile(r"^(?=.*?\p{Lowercase_Letter})(?=.*?\p{Uppercase_L
bw_version = get_version()
if not TMP_DIR.joinpath(".ui.json").is_file():
TMP_DIR.joinpath(".ui.json").write_text("{}", encoding="utf-8")
try:
app.config.update(
INSTANCES=Instances(docker_client, kubernetes_client, INTEGRATION, db),