summaryrefslogtreecommitdiff
path: root/searx/webapp.py
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2016-12-28 21:17:51 +0100
committerAdam Tauber <asciimoo@gmail.com>2016-12-28 21:17:51 +0100
commit7388067f1546f560830a25d0082c0ab9fc1cba34 (patch)
treedb92a8b9a72c35963e6472b3fd38f7b0602bc5c9 /searx/webapp.py
parent116521192e5feccd764d58a94ec8ddcedda893ac (diff)
downloadsearxng-7388067f1546f560830a25d0082c0ab9fc1cba34.tar.gz
searxng-7388067f1546f560830a25d0082c0ab9fc1cba34.zip
[fix] load engines with uwsgi too
Diffstat (limited to 'searx/webapp.py')
-rw-r--r--searx/webapp.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/searx/webapp.py b/searx/webapp.py
index 1682015cf..4fee6e588 100644
--- a/searx/webapp.py
+++ b/searx/webapp.py
@@ -104,6 +104,9 @@ app.jinja_env.trim_blocks = True
app.jinja_env.lstrip_blocks = True
app.secret_key = settings['server']['secret_key']
+if not searx_debug or os.environ.get("WERKZEUG_RUN_MAIN") == "true":
+ initialize_engines(settings['engines'])
+
babel = Babel(app)
rtl_locales = ['ar', 'arc', 'bcc', 'bqi', 'ckb', 'dv', 'fa', 'glk', 'he',
@@ -769,9 +772,6 @@ def page_not_found(e):
def run():
- 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,