Browse Source

[fix] do not reload engines twice if started with debug mode

Adam Tauber 8 years ago
parent
commit
68cbf0448f
1 changed files with 3 additions and 1 deletions
  1. 3 1
      searx/webapp.py

+ 3 - 1
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,