Merge pull request 'fix(agent): align failover with configured heartbeat intervals' (#87) from fix/heartbeat-aware-failover into main
Heimdall Gitea / Build and tests (push) Successful in 14m54s
Heimdall Gitea / Publish versioned release (push) Skipped
Heimdall Gitea / Publish Docker Hub latest tags (push) Canceled after 0s
Heimdall Gitea / Build and scan server image (push) Canceled after 4m30s
Heimdall Gitea / Build and scan agent image (push) Canceled after 2m36s

fix(agent): align failover with configured heartbeat intervals
This commit was merged in pull request #87.
This commit is contained in:
arnaud.dartois committed 2026-10-25 03:21:27 +01:00
commit fddea09928
16 files changed
+179 -33

No files matched your search

@@ -255,7 +255,16 @@ public class SettingsController : ControllerBase
if (!result.IsSuccess)
return StatusCode(result.StatusCode ?? 400, new { error = result.Error });
await _broadcast.NotifyAgentSettingChanged(agentId, key, string.Empty, ct);
var valueToApply = "";
if (key.Equals("heartbeat.interval.seconds", StringComparison.OrdinalIgnoreCase))
{
valueToApply = "30";
var globalSetting = await _mediator.Send(new GetSettingByKeyQuery("heartbeat.interval.seconds"), ct);
if (globalSetting.IsSuccess && globalSetting.Data is not null)
valueToApply = globalSetting.Data.Value;
}
await _broadcast.NotifyAgentSettingChanged(agentId, key, valueToApply, ct);
_logger.LogInformation("Removed agent override Agent={AgentId}, {Key}", agentId, key);
return NoContent();
}