From 00c4d84b197d7ce10b6847628f0d2e14bd0926d5 Mon Sep 17 00:00:00 2001 From: nsantacruz Date: Mon, 9 Dec 2024 12:00:30 +0200 Subject: [PATCH] fix(startup): set preload_app to True --- helm-chart/sefaria-project/templates/configmap/gunicorn.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/helm-chart/sefaria-project/templates/configmap/gunicorn.yaml b/helm-chart/sefaria-project/templates/configmap/gunicorn.yaml index b93bc44f16..86644a6c18 100644 --- a/helm-chart/sefaria-project/templates/configmap/gunicorn.yaml +++ b/helm-chart/sefaria-project/templates/configmap/gunicorn.yaml @@ -25,6 +25,7 @@ data: {{- end }} loglevel = "warning" + preload_app = True {{- if .Values.instrumentation.enabled }} def post_fork(server, worker): @@ -33,7 +34,7 @@ data: {{- end }} - def when_ready(server): + def on_starting(server): from reader.startup import init_library_cache init_library_cache()