MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / persistHealthResult

Function persistHealthResult

packages/core/sdk/src/executor.ts:3229–3243  ·  view source on GitHub ↗
(
      ref: ConnectionRef,
      result: HealthCheckResult,
    )

Source from the content-addressed store, hash-verified

3227 const unknownHealth = (): HealthCheckResult => ({ status: "unknown", checkedAt: Date.now() });
3228
3229 const persistHealthResult = (
3230 ref: ConnectionRef,
3231 result: HealthCheckResult,
3232 ): Effect.Effect<void, never> =>
3233 core
3234 .updateMany("connection", {
3235 where: (b: AnyCb) =>
3236 b.and(
3237 b("owner", "=", String(ref.owner)),
3238 b("integration", "=", String(ref.integration)),
3239 b("name", "=", String(ref.name)),
3240 ),
3241 set: { last_health: result, updated_at: new Date() },
3242 })
3243 .pipe(Effect.ignore);
3244
3245 const healthFromCredentialResolutionError = (
3246 err: CredentialResolutionError,

Callers 1

connectionCheckHealthFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected