feat(health): SiteAuditTelemetryStalledTracker subscribes to EventStream (#23 M6)

This commit is contained in:
Joseph Doherty
2026-05-20 19:07:44 -04:00
parent e93f655ce4
commit 42333a72ed
3 changed files with 285 additions and 0 deletions

View File

@@ -259,6 +259,17 @@ public static class ServiceCollectionExtensions
.Bind(config.GetSection(PartitionMaintenanceSectionName));
services.AddHostedService<AuditLogPartitionMaintenanceService>();
// M6 Bundle E (T7): central-singleton tracker for per-site
// SiteAuditTelemetryStalledChanged events published by
// SiteAuditReconciliationActor. Singleton so the EventStream
// subscription registers exactly once on host startup; the tracker's
// ctor needs an ActorSystem which is composed by the AkkaHostedService
// — we go through a factory so the SP is the source of truth for the
// system reference rather than re-resolving it on the consumer side.
services.AddSingleton<SiteAuditTelemetryStalledTracker>(sp =>
new SiteAuditTelemetryStalledTracker(
sp.GetRequiredService<Akka.Actor.ActorSystem>()));
return services;
}
}