Changeset View
Changeset View
Standalone View
Standalone View
swh/web/config.py
Show First 20 Lines • Show All 125 Lines • ▼ Show 20 Lines | "status": ( | ||||
{ | { | ||||
"server_url": "https://status.softwareheritage.org/", | "server_url": "https://status.softwareheritage.org/", | ||||
"json_path": "1.0/status/578e5eddcdc0cc7951000520", | "json_path": "1.0/status/578e5eddcdc0cc7951000520", | ||||
}, | }, | ||||
), | ), | ||||
"metadata_search_backend": ("string", "swh-indexer-storage"), # or "swh-search" | "metadata_search_backend": ("string", "swh-indexer-storage"), # or "swh-search" | ||||
"counters_backend": ("string", "swh-storage"), # or "swh-counters" | "counters_backend": ("string", "swh-storage"), # or "swh-counters" | ||||
"staging_server_names": ("list", STAGING_SERVER_NAMES), | "staging_server_names": ("list", STAGING_SERVER_NAMES), | ||||
"instance_name": ("str", "archive-test.softwareheritage.org"), | |||||
} | } | ||||
swhweb_config = {} # type: Dict[str, Any] | swhweb_config: Dict[str, Any] = {} | ||||
def get_config(config_file="web/web"): | def get_config(config_file="web/web"): | ||||
"""Read the configuration file `config_file`. | """Read the configuration file `config_file`. | ||||
If an environment variable SWH_CONFIG_FILENAME is defined, this | If an environment variable SWH_CONFIG_FILENAME is defined, this | ||||
takes precedence over the config_file parameter. | takes precedence over the config_file parameter. | ||||
▲ Show 20 Lines • Show All 69 Lines • Show Last 20 Lines |