fix: preserve source failures in last fetch
This commit is contained in:
@@ -1997,7 +1997,13 @@ def account_pricing_fetch_label(
|
||||
fetched = short_time(account.get("pricing_last_fetch_at"))
|
||||
status = str(account.get("pricing_fetch_status") or "").strip()
|
||||
if fetched == "-":
|
||||
return str(pricing_source.get("updated") or "-") if pricing_source else (status or "-")
|
||||
if not pricing_source:
|
||||
return status or "-"
|
||||
updated = str(pricing_source.get("updated") or "-")
|
||||
source_status = str(pricing_source.get("status") or "").strip()
|
||||
if source_status not in {"", "healthy"}:
|
||||
return f"{updated} {source_status}" if updated != "-" else source_status
|
||||
return updated
|
||||
if status in {"", "matched", "ok"}:
|
||||
return fetched
|
||||
return f"{fetched} {status}"
|
||||
|
||||
Reference in New Issue
Block a user