4 Commits

Author SHA1 Message Date
Markus Heiser
33729439c5 [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 <markus.heiser@darmarit.de>
2025-04-24 17:24:51 +02:00
Markus Heiser
20ce88a274 Revert "[fix] is_werkzeug_reload_active is not realted to python -m"
This reverts commit 3392beb914.
2025-04-24 17:03:20 +02:00
Zhijie He
8595e467ce [fix] fix Quark engine calling 2025-04-24 16:17:34 +02:00
Markus Heiser
3392beb914 [fix] is_werkzeug_reload_active is not realted to python -m
Werkzeug's reloader is not active when was server is launched by::

    python -m searx.webapp

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-04-24 15:33:59 +02:00
2 changed files with 6 additions and 2 deletions

View File

@@ -11,7 +11,7 @@ from searx.exceptions import SearxEngineAPIException, SearxEngineCaptchaExceptio
# Metadata
about = {
"website": "https://m.quark.cn/",
"website": "https://quark.sm.cn/",
"wikidata_id": "Q48816502",
"use_official_api": False,
"require_api_key": False,
@@ -53,7 +53,7 @@ def request(query, params):
category_config = {
'general': {
'endpoint': 'https://m.quark.cn/s',
'endpoint': 'https://quark.sm.cn/s',
'params': {
"q": query,
"layout": "html",

View File

@@ -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