diff --git a/research/daily_report.py b/research/daily_report.py index 2c95381..315fa21 100644 --- a/research/daily_report.py +++ b/research/daily_report.py @@ -193,7 +193,8 @@ def health_section(paper, live, today, alerts) -> list[str]: alerts.append(f"The {name} stack was silent for {gap_min:.0f} min during market hours.") if n == 0: alerts.append(f"The {name} stack wrote no heartbeats during market hours.") - elif last and last.strftime("%H:%M") < "15:45": + elif last and (datetime.now(ET).replace(tzinfo=None) - last).total_seconds() > 900 \ + and last.strftime("%H:%M") < "15:45": # silent for 15+ min, before the close alerts.append(f"The {name} stack went silent at {last:%H:%M} ET.") except Exception as e: # noqa: BLE001 lines.append(f"- {name}: ERROR {str(e)[:120]}")