diff options
author | Markus Heiser <markus.heiser@darmarit.de> | 2020-02-23 23:03:05 +0100 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarit.de> | 2020-02-23 23:03:05 +0100 |
commit | 81f106e5de58c40d5ee9dd3232ab2244ea4103cd (patch) | |
tree | 8d016d3e747c4443c8f8f20a0a967d658af03646 /searx/testing.py | |
parent | 4a94b4cca6e609856cf717dfae5d7ea4a1df0469 (diff) | |
download | searxng-81f106e5de58c40d5ee9dd3232ab2244ea4103cd.tar.gz searxng-81f106e5de58c40d5ee9dd3232ab2244ea4103cd.zip |
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>
Diffstat (limited to 'searx/testing.py')
-rw-r--r-- | searx/testing.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/searx/testing.py b/searx/testing.py index 8931c6a88..716e203c1 100644 --- a/searx/testing.py +++ b/searx/testing.py @@ -45,8 +45,16 @@ class SearxRobotLayer(): webapp = join(abspath(dirname(realpath(__file__))), 'webapp.py') 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 - os.environ['SEARX_DEBUG'] = '1' os.environ['SEARX_SETTINGS_PATH'] = abspath( dirname(__file__) + '/settings_robot.yml') |