mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-08-06 18:41:41 +00:00
Refactor of caching & data storage part 14 #118
This commit is contained in:
@@ -25,11 +25,10 @@ class QRZ(APIQueryCallsignDataProvider):
|
||||
# and password, this is valid for an hour, so our cache stores this specifically for 55 minutes.
|
||||
self._CREDENTIALS_CACHE = CachedSession(CACHE_DIR + "/urls/qrz-creds",
|
||||
expire_after=timedelta(minutes=55))
|
||||
self.status = "Ready"
|
||||
|
||||
def _perform_new_lookup(self, callsign, lookup_credentials):
|
||||
# If we don't have QRZ credentials, skip this lookup
|
||||
if not ((lookup_credentials.qrz_username and lookup_credentials.qrz_password)
|
||||
if not lookup_credentials or not ((lookup_credentials.qrz_username and lookup_credentials.qrz_password)
|
||||
or lookup_credentials.qrz_session_key):
|
||||
return None
|
||||
|
||||
@@ -153,4 +152,5 @@ class QRZ(APIQueryCallsignDataProvider):
|
||||
grid=grid,
|
||||
dxcc_id=int(data["adif"]) if "adif" in data else None,
|
||||
cq_zone=int(data["cqzone"]) if "cqzone" in data else None,
|
||||
itu_zone=int(data["ituzone"]) if "ituzone" in data else None)
|
||||
itu_zone=int(data["ituzone"]) if "ituzone" in data else None,
|
||||
location_source="HOME QTH")
|
||||
|
||||
Reference in New Issue
Block a user