fix(agent): align failover with heartbeat intervals
Heimdall Gitea / Build and tests (pull_request) Canceled after 0s
Heimdall Gitea / Build and scan server image (pull_request) Canceled after 0s
Heimdall Gitea / Build and scan agent image (pull_request) Canceled after 0s
Heimdall Gitea / Publish Docker Hub latest tags (pull_request) Canceled after 0s
Heimdall Gitea / Publish versioned release (pull_request) Canceled after 0s
Heimdall Gitea / Build and tests (pull_request) Canceled after 0s
Heimdall Gitea / Build and scan server image (pull_request) Canceled after 0s
Heimdall Gitea / Build and scan agent image (pull_request) Canceled after 0s
Heimdall Gitea / Publish Docker Hub latest tags (pull_request) Canceled after 0s
Heimdall Gitea / Publish versioned release (pull_request) Canceled after 0s
This commit is contained in:
1 parent
83ee648c2d
commit
8d5447f826
10 files changed
+125
-23
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();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user