mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-08-06 02:21:42 +00:00
Refactor of caching & data storage part 12 #118
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user