From 31512ee50fead98a7f5194ce64598c65349a4c4e Mon Sep 17 00:00:00 2001 From: Mart van Santen <mart@samage.net> Date: Thu, 8 Jun 2023 08:54:26 +0000 Subject: [PATCH] Improve comment about init routines --- backend/app.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/backend/app.py b/backend/app.py index 5594bb3c..fd993e41 100644 --- a/backend/app.py +++ b/backend/app.py @@ -95,12 +95,10 @@ def init_routines(): # Same for the list of oauthclients. cluster_config.populate_oauthclients() -# `init_routines` has to run only once per dashboard instance, or at least not -# concurrently. We used to have locking in place to prevent concurrent -# executions of this code, but we now rely on proper configuration of gunicorn -# and/or flask to make sure this is run only once. In particular: +# `init_routines`should only run once per dashboard instance. To enforce this we +# have a different mode for production and development mode: # * we have "preload" on for gunicorn, so this file is loaded only once, before -# workers are forked; +# workers are forked (production); # * we make sure that in development mode we run this only once, even though # this file is loaded twice by flask for some reason. if DEV_MODE: -- GitLab