debug: add cache hash comparison log
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions

This commit is contained in:
Maciej Pienczyn 2026-02-07 13:48:00 +01:00
parent 0c6cd09d18
commit 1d6dfa0da8

View File

@ -595,6 +595,9 @@ def generate_analysis(company_id: int, audit_type: str, user_id: int = None, for
audit_type=audit_type
).first()
if cache:
logger.info(f"Cache check: stored_hash={cache.audit_data_hash[:12]}... current_hash={data_hash[:12]}... match={cache.audit_data_hash == data_hash} expires={cache.expires_at}")
if cache and cache.audit_data_hash == data_hash and cache.expires_at and cache.expires_at > datetime.now():
logger.info(f"AI analysis cache hit for company {company_id} audit_type={audit_type}")
return {