mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-08-06 02:21:42 +00:00
Refactor of caching & data storage part 6 #118
This commit is contained in:
@@ -60,6 +60,14 @@ def get_solar_conditions_provider_from_config(config_providers_entry):
|
||||
return provider_class(config_providers_entry)
|
||||
|
||||
|
||||
def get_static_data_provider_from_config(config_providers_entry):
|
||||
"""Utility method to get a static reference data provider based on the class specified in its config entry."""
|
||||
|
||||
module = importlib.import_module('staticdataproviders.' + config_providers_entry["class"].lower())
|
||||
provider_class = getattr(module, config_providers_entry["class"])
|
||||
return provider_class(config_providers_entry)
|
||||
|
||||
|
||||
def get_sig_ref_data_provider_from_config(config_providers_entry):
|
||||
"""Utility method to get a SIG reference data provider based on the class specified in its config entry."""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user