summaryrefslogtreecommitdiff
path: root/searx/webapp.py
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2016-12-27 17:26:25 +0100
committerAdam Tauber <asciimoo@gmail.com>2016-12-27 17:31:14 +0100
commit68cbf0448f0b24ec9d15301659576ace695e06ef (patch)
tree753f6618b9c2407e4fda308f23c230f3e465bc48 /searx/webapp.py
parenta605377c40e5f9d5ce80a222df65b605dfcd3907 (diff)
downloadsearxng-68cbf0448f0b24ec9d15301659576ace695e06ef.tar.gz
searxng-68cbf0448f0b24ec9d15301659576ace695e06ef.zip
[fix] do not reload engines twice if started with debug mode
Diffstat (limited to 'searx/webapp.py')
-rw-r--r--searx/webapp.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/searx/webapp.py b/searx/webapp.py
index 8a720fdc6..6ad9ef06e 100644
--- a/searx/webapp.py
+++ b/searx/webapp.py
@@ -765,7 +765,9 @@ def page_not_found(e):
def run():
- initialize_engines(settings['engines'])
+ if not searx_debug or os.environ.get("WERKZEUG_RUN_MAIN") == "true":
+ initialize_engines(settings['engines'])
+
app.run(
debug=searx_debug,
use_debugger=searx_debug,