on master help sign in
searx/testing.py: bugfix process model (do not use Flask's debug mode)

Don't enable Flask's debug mode, the debugger from Flask will cause a wired process model, where the server never dies. Further read: - debug mode: https://flask.palletsprojects.com/quickstart/#debug-mode - Flask.run(..): https://flask.palletsprojects.com/api/#flask.Flask.run closes: https://github.com/asciimoo/searx/issues/1862 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>

commit81f106e5de58c40d5ee9dd3232ab2244ea4103cd authorMarkus Heiser <markus.heiser@darmarit.de> dateSun 23 Feb 2020, 23:03 (7 years ago) parent4a94b4c
1 file changed+9−1
searx/testing.py+9−1
searx/testing.py+9−1
@@ -45,8 +45,16 @@ class SearxRobotLayer():
4545 webapp = join(abspath(dirname(realpath(__file__))), 'webapp.py')
4646 exe = 'python'
4747
48+ # The Flask app is started by Flask.run(...), don't enable Flask's debug
49+ # mode, the debugger from Flask will cause wired process model, where
50+ # the server never dies. Further read:
51+ #
52+ # - debug mode: https://flask.palletsprojects.com/quickstart/#debug-mode
53+ # - Flask.run(..): https://flask.palletsprojects.com/api/#flask.Flask.run
54+
55+ os.environ['SEARX_DEBUG'] = '0'
56+
4857 # set robot settings path
49− os.environ['SEARX_DEBUG'] = '1'
5058 os.environ['SEARX_SETTINGS_PATH'] = abspath(
5159 dirname(__file__) + '/settings_robot.yml')
5260