feat(site): DeploymentManagerActor fetches config then applies (notify-and-fetch)

This commit is contained in:
Joseph Doherty
2026-06-26 13:47:28 -04:00
parent 3955cb4f28
commit 631ce5bfce
3 changed files with 257 additions and 9 deletions
@@ -839,6 +839,12 @@ akka {{
_logger.LogInformation("SiteReplicationActor created and S&F replication handler wired");
// Notify-and-fetch (Task 10): the active singleton fetches a deployment's
// flattened config from central over HTTP when a RefreshDeploymentCommand
// arrives. Resolve the fetcher from the same provider the actor already uses.
var deploymentConfigFetcher =
_serviceProvider.GetService<ZB.MOM.WW.ScadaBridge.SiteRuntime.Deployment.IDeploymentConfigFetcher>();
// Create the Deployment Manager as a cluster singleton
var singletonProps = ClusterSingletonManager.Props(
singletonProps: Props.Create(() => new DeploymentManagerActor(
@@ -851,7 +857,9 @@ akka {{
dclManager,
replicationActor,
siteHealthCollector,
_serviceProvider)),
_serviceProvider,
null,
deploymentConfigFetcher)),
terminationMessage: PoisonPill.Instance,
settings: ClusterSingletonManagerSettings.Create(_actorSystem!)
.WithRole(siteRole)