Refactor of caching & data storage part 12 #118

This commit is contained in:
Ian Renton
2026-08-02 21:57:22 +01:00
parent cee9188538
commit e31b145b8e
11 changed files with 227 additions and 26 deletions
+4 -3
View File
@@ -2,8 +2,8 @@ import logging
from pyhamtools import LookupLib, Callinfo
from core.data_store import DATA_STORE
from core.utils import get_callsign_object_from_pyhamtools_callinfo
from data.callsign import Callsign
from providers.callsigndata.file_download_callsign_data_provider import FileDownloadCallsignDataProvider
@@ -16,7 +16,8 @@ class CountryFiles(FileDownloadCallsignDataProvider):
_callinfo = None
def __init__(self, provider_config):
super().__init__("CountryFiles.com", provider_config, self.DATA_URL, self.CACHE_PATH, self.POLL_INTERVAL_DAYS)
super().__init__("CountryFiles.com", provider_config, self.DATA_URL, self.CACHE_PATH, self.POLL_INTERVAL_DAYS,
DATA_STORE.callsign_data_countryfiles)
def _handle_file(self, path):
try:
@@ -28,5 +29,5 @@ class CountryFiles(FileDownloadCallsignDataProvider):
logging.error("Exception when loading Country Files cty.plist.", e, exc_info=True)
return False
def lookup(self, callsign, lookup_credentials):
def _perform_new_lookup(self, callsign, lookup_credentials):
return get_callsign_object_from_pyhamtools_callinfo(callsign, self._callinfo)