monitoring.cleanup module

Cleanup utilities for predictive/observability artifacts (Session 5).

Rules: - Never delete outside of the project data/ directory. - Fail-open: log and return on any unexpected error. - Provide a CLI for manual cleanup in dev/CI.

monitoring.cleanup.cleanup_predictions(max_age_seconds=None, now_ts=None)[מקור]

Cleanup old prediction records under data/.

Keeps only records newer than now - max_age_seconds.

Return type:

None

פרמטרים:
  • max_age_seconds (int | None)

  • now_ts (float | None)

monitoring.cleanup.cleanup_incidents(max_age_seconds=None, now_ts=None)[מקור]

Cleanup old incident records under data/.

Mirrors predictions cleanup for symmetry.

Return type:

None

פרמטרים:
  • max_age_seconds (int | None)

  • now_ts (float | None)

monitoring.cleanup.main(argv=None)[מקור]
Return type:

int

פרמטרים:

argv (Iterable[str] | None)