Skip to content

Commit a9d3c2b

Browse files
sfayerfstagni
andcommitted
fix: Only auto-reload webapp in development mode
Co-authored-by: Federico Stagni <federico.stagni@cern.ch>
1 parent c33ae90 commit a9d3c2b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/WebAppDIRAC/Core/App.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,14 @@ def bootstrap(self):
9696
SessionData.setHandlers(self.__handlerMgr.getHandlers()["Value"])
9797
# Create the app
9898
tLoader = TemplateLoader(self.__handlerMgr.getPaths("template"))
99+
debug = Conf.devMode()
100+
autoreload = (Conf.numProcesses() < 2) and debug
99101
kw = dict(
100-
debug=Conf.devMode(),
102+
debug=debug,
101103
template_loader=tLoader,
102104
cookie_secret=str(Conf.cookieSecret()),
103105
log_function=self._logRequest,
104-
autoreload=Conf.numProcesses() < 2,
106+
autoreload=autoreload,
105107
)
106108

107109
# please do no move this lines. The lines must be before the fork_processes

0 commit comments

Comments
 (0)