quality / commitlint (push) Skipped
CD / update-wiki (push) Failing after 8s
quality / changes (push) Successful in 5s
quality / docker-check (push) Skipped
quality / web (push) Successful in 50s
quality / api (push) Successful in 41s
CD / quality (push) Successful in 1m40s
CD / publish (push) Successful in 1m33s
- Introduced origin health check routes and integrated them into the application. - Updated health check configuration to include success recovery thresholds. - Expanded error handling with new error codes for health check failures. - Added new service routes for managing health checks, including creation and listing. - Improved health check service logic to track consecutive successes and failures. This commit enhances the health check capabilities, providing better monitoring and management of service health.
9 lines
293 B
TypeScript
9 lines
293 B
TypeScript
import type { LbIpRow } from "./types.js";
|
|
import { isHealthy } from "./health.js";
|
|
|
|
export function roundRobinDesired(rows: LbIpRow[]): string[] {
|
|
const healthy = rows.filter((r) => isHealthy(r.health));
|
|
const pool = healthy.length > 0 ? healthy : rows;
|
|
return pool.map((r) => r.ip);
|
|
}
|