mirror of
https://github.com/searxng/searxng.git
synced 2024-11-20 03:10:10 +01:00
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>
This commit is contained in:
parent
4a94b4cca6
commit
81f106e5de
@ -45,8 +45,16 @@ class SearxRobotLayer():
|
|||||||
webapp = join(abspath(dirname(realpath(__file__))), 'webapp.py')
|
webapp = join(abspath(dirname(realpath(__file__))), 'webapp.py')
|
||||||
exe = 'python'
|
exe = 'python'
|
||||||
|
|
||||||
|
# The Flask app is started by Flask.run(...), don't enable Flask's debug
|
||||||
|
# mode, the debugger from Flask will cause 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
|
||||||
|
|
||||||
|
os.environ['SEARX_DEBUG'] = '0'
|
||||||
|
|
||||||
# set robot settings path
|
# set robot settings path
|
||||||
os.environ['SEARX_DEBUG'] = '1'
|
|
||||||
os.environ['SEARX_SETTINGS_PATH'] = abspath(
|
os.environ['SEARX_SETTINGS_PATH'] = abspath(
|
||||||
dirname(__file__) + '/settings_robot.yml')
|
dirname(__file__) + '/settings_robot.yml')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user