Browse Source

[fix] load engines if debug mode is enabled using uwsgi

Adam Tauber 7 years ago
parent
commit
6d76d9b202
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      searx/webapp.py

+ 3
- 1
searx/webapp.py View File

120
 app.jinja_env.lstrip_blocks = True
120
 app.jinja_env.lstrip_blocks = True
121
 app.secret_key = settings['server']['secret_key']
121
 app.secret_key = settings['server']['secret_key']
122
 
122
 
123
-if not searx_debug or os.environ.get("WERKZEUG_RUN_MAIN") == "true":
123
+if not searx_debug \
124
+   or os.environ.get("WERKZEUG_RUN_MAIN") == "true" \
125
+   or os.environ.get('UWSGI_ORIGINAL_PROC_NAME') is not None:
124
     initialize_engines(settings['engines'])
126
     initialize_engines(settings['engines'])
125
 
127
 
126
 babel = Babel(app)
128
 babel = Babel(app)