fix(historian-gateway): dispose alarm-write channel at shutdown + ServerHistorian startup diagnostic

Claude-Session: https://claude.ai/code/session_012SDSQ3AcaXqPcBtDESBRii
This commit is contained in:
Joseph Doherty
2026-06-26 17:55:44 -04:00
parent 22711444cc
commit 035bde0562
4 changed files with 28 additions and 2 deletions
@@ -109,6 +109,8 @@ if (hasDriver)
var serverHistorianOptions = builder.Configuration
.GetSection(ServerHistorianOptions.SectionName).Get<ServerHistorianOptions>()
?? new ServerHistorianOptions();
foreach (var warning in serverHistorianOptions.Validate())
Log.Warning("ServerHistorian misconfiguration detected at startup: {Warning}", warning);
builder.Services.AddAlarmHistorian(
builder.Configuration,
(_, sp) => GatewayHistorian.CreateAlarmWriter(serverHistorianOptions, sp));