Skip to content
Snippets Groups Projects
Commit 31512ee5 authored by Mart van Santen's avatar Mart van Santen Committed by Arie Peterson
Browse files

Improve comment about init routines

parent 7870788b
No related branches found
No related tags found
No related merge requests found
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment