feat(stability): unify readiness and recovery
CI - Build & Test / Backend (.NET) (push) Successful in 45s
CI - Build & Test / Backend integration (PostgreSQL/Toxiproxy) (push) Failing after 1m0s
CI - Build & Test / Frontend (Vue/TS) (push) Successful in 2m49s
CI - Build & Test / Security Check (push) Successful in 7s
CI - Build & Test / Deploy Nexus (push) Has been skipped

This commit is contained in:
AzuTear
2026-08-01 01:21:33 +02:00
parent 38282e4f7f
commit cd8c78d165
67 changed files with 2616 additions and 601 deletions
+20
View File
@@ -18,6 +18,26 @@ public class HealthController(IAgentRuntime runtime, HealthCheckService healthCh
agentSource = "openclaw-rpc"
});
[AllowAnonymous]
[HttpGet("/health/ready")]
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status503ServiceUnavailable)]
public async Task<IResult> Ready(CancellationToken ct)
{
var report = await healthChecks.CheckHealthAsync(
registration => registration.Tags.Contains("ready"),
ct);
var payload = new
{
status = report.Status == HealthStatus.Healthy ? "Healthy" : "Unhealthy",
timestamp = DateTimeOffset.UtcNow
};
return report.Status == HealthStatus.Healthy
? Results.Ok(payload)
: Results.Json(payload, statusCode: StatusCodes.Status503ServiceUnavailable);
}
[AllowAnonymous]
[HttpGet("/health")]
public async Task<IResult> Get(CancellationToken ct)