reduced freshness down to 14 days

This commit is contained in:
Khalim Conn-Kowlessar 2026-04-09 17:17:41 +01:00
parent fbf23bc898
commit 2fb14858eb

View file

@ -11,7 +11,7 @@ class EpcStoreService:
Service layer for EPC data lookup and persistence.
"""
FRESHNESS_DAYS = 30 # Upgraded to 30 days
FRESHNESS_DAYS = 14 # Upgraded to 14 days
# status labels
FRESH = "fresh"
@ -22,7 +22,7 @@ class EpcStoreService:
def get_epc_for_uprn(cls, session: Session, uprn: int):
"""
Query EPC data for a given UPRN and return a dict describing:
- epc_api: only if within last 30 days
- epc_api: only if within last 21 days
- epc_page: only if epc_api exists
- status: 'fresh', 'expired', or 'missing'
"""