From 33729439c5f1b555c6070e24c1f175605cb0ec77 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Thu, 24 Apr 2025 17:24:51 +0200 Subject: [PATCH] [fix] is_werkzeug_reload_active is not realted to python -m Werkzeug's reloader is not active when was server is launched by uWSGI. Signed-off-by: Markus Heiser --- searx/webapp.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/searx/webapp.py b/searx/webapp.py index 4ecaab7d2..3b4cf1604 100755 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -1373,6 +1373,10 @@ def is_werkzeug_reload_active() -> bool: https://werkzeug.palletsprojects.com/en/stable/serving/#werkzeug.serving.run_simple """ + if "uwsgi" in sys.argv: + # server was launched by uWSGI + return False + # https://github.com/searxng/searxng/pull/1656#issuecomment-1214198941 # https://github.com/searxng/searxng/pull/1616#issuecomment-1206137468