import type { ChannelAccountSnapshot } from "../../channels/plugins/types.public.js"; import {
DEFAULT_CHANNEL_CONNECT_GRACE_MS,
DEFAULT_CHANNEL_STALE_EVENT_THRESHOLD_MS,
evaluateChannelHealth,
type ChannelHealthPolicy,
type ChannelHealthEvaluation,
} from "../channel-health-policy.js"; import type { ChannelManager } from "../server-channels.js";
export type ReadinessChecker = () => ReadinessResult;
const DEFAULT_READINESS_CACHE_TTL_MS = 1_000;
function shouldIgnoreReadinessFailure(
accountSnapshot: ChannelAccountSnapshot,
health: ChannelHealthEvaluation,
): boolean { if (health.reason === "unmanaged" || health.reason === "stale-socket") { returntrue;
} // Channel restarts spend time in backoff with running=false before the next // lifecycle re-enters startup grace. Keep readiness green during that handoff // window, but still surface hard failures once restart attempts are exhausted. return health.reason === "not-running" && accountSnapshot.restartPending === true;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.