Skip to content
Snippets Groups Projects
Commit 0a834df7 authored by David Douard's avatar David Douard
Browse files

config: Fix the handling of the indexer_storage config entry

There is a discrepancy between the config entry and the module name, so
deal with it...
parent 61ab821e
No related branches found
No related tags found
No related merge requests found
Pipeline #12675 failed
......@@ -172,16 +172,16 @@ def get_config(config_file: str = "web/web") -> SWHWebConfig:
cfg = config.load_named_config(config_file, DEFAULT_CONFIG)
swhweb_config.update(cfg)
config.prepare_folders(swhweb_config, "log_dir")
for service in (
"search",
"storage",
"vault",
"indexer_storage",
"scheduler",
"counters",
for service, modname in (
("search", "search"),
("storage", "storage"),
("vault", "vault"),
("indexer_storage", "indexer.storage"),
("scheduler", "scheduler"),
("counters", "counters"),
):
if isinstance(swhweb_config.get(service), dict):
mod = importlib.import_module(f"swh.{service}")
mod = importlib.import_module(f"swh.{modname}")
getter = getattr(mod, f"get_{service}")
swhweb_config[service] = getter(**swhweb_config[service])
return swhweb_config
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment