feat(growth): close same-item reconciliation loop

This commit is contained in:
ogt
2026-07-14 21:03:25 +08:00
parent 15a2914001
commit ab68fec9ed
16 changed files with 1383 additions and 106 deletions

View File

@@ -93,7 +93,7 @@ def _pchome_growth_backfill_due(*, now=None) -> tuple[bool, str]:
status = str(latest.get("status") or "").lower()
cooldown_hours = float(os.getenv("PCHOME_GROWTH_BACKFILL_COOLDOWN_HOURS", "4"))
if status == "failed":
if status in {"failed", "degraded", "partial"}:
cooldown_hours = float(os.getenv("PCHOME_GROWTH_BACKFILL_RETRY_HOURS", "1"))
elapsed_hours = max(0.0, (current - last_run).total_seconds() / 3600)
if elapsed_hours >= cooldown_hours: