mirror of
https://github.com/searxng/searxng.git
synced 2026-09-03 04:51:24 +00:00
[mod] engines: migrate to setup() from init() for simple tasks
This commit is contained in:
@@ -38,12 +38,10 @@ CACHE: EngineCache
|
||||
"""Cache to store verification tokens for pagination."""
|
||||
|
||||
|
||||
def init(_):
|
||||
def setup(engine_settings: dict[str, t.Any]) -> bool:
|
||||
if not base_url:
|
||||
raise ValueError("base_url must be set")
|
||||
|
||||
|
||||
def setup(engine_settings: dict[str, t.Any]) -> bool:
|
||||
global CACHE # pylint: disable=global-statement
|
||||
CACHE = EngineCache(engine_settings["name"])
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user