summaryrefslogtreecommitdiff
path: root/searx/webapp.py
diff options
context:
space:
mode:
authorAlexandre Flament <alex@al-f.net>2020-08-31 18:59:27 +0200
committerAlexandre Flament <alex@al-f.net>2020-08-31 19:00:06 +0200
commitb329058c1ad06fe9c1afd56c81e0ad27dbef06b8 (patch)
tree8cb271bcbcb15fbb65b27538203e3a2475871e26 /searx/webapp.py
parent315cdfee09cb34b0006daf76697f7d4f7cfba01d (diff)
downloadsearxng-b329058c1ad06fe9c1afd56c81e0ad27dbef06b8.tar.gz
searxng-b329058c1ad06fe9c1afd56c81e0ad27dbef06b8.zip
Revert "[enh] test: load each engine to check for syntax errors"
This reverts commit 4fb3ed2c6335b68f6b28ebc68d5d22f2fd621648.
Diffstat (limited to 'searx/webapp.py')
-rwxr-xr-xsearx/webapp.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/searx/webapp.py b/searx/webapp.py
index 8a07d5ff1..4c0eceaaf 100755
--- a/searx/webapp.py
+++ b/searx/webapp.py
@@ -136,6 +136,11 @@ app.jinja_env.lstrip_blocks = True
app.jinja_env.add_extension('jinja2.ext.loopcontrols')
app.secret_key = settings['server']['secret_key']
+if not searx_debug \
+ or os.environ.get("WERKZEUG_RUN_MAIN") == "true" \
+ or os.environ.get('UWSGI_ORIGINAL_PROC_NAME') is not None:
+ initialize_engines(settings['engines'])
+
babel = Babel(app)
rtl_locales = ['ar', 'arc', 'bcc', 'bqi', 'ckb', 'dv', 'fa', 'fa_IR', 'glk', 'he',
@@ -1046,10 +1051,6 @@ def page_not_found(e):
def run():
- if not searx_debug \
- or os.environ.get("WERKZEUG_RUN_MAIN") == "true" \
- or os.environ.get('UWSGI_ORIGINAL_PROC_NAME') is not None:
- initialize_engines(settings['engines'])
logger.debug('starting webserver on %s:%s', settings['server']['bind_address'], settings['server']['port'])
app.run(
debug=searx_debug,