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

Function persistHealthResult

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

Source from the content-addressed store, hash-verified

3588 const unknownHealth = (): HealthCheckResult => ({ status: "unknown", checkedAt: Date.now() });
3589
3590 const persistHealthResult = (
3591 ref: ConnectionRef,
3592 result: HealthCheckResult,
3593 ): Effect.Effect<void, never> =>
3594 core
3595 .updateMany("connection", {
3596 where: (b: AnyCb) =>
3597 b.and(
3598 b("owner", "=", String(ref.owner)),
3599 b("integration", "=", String(ref.integration)),
3600 b("name", "=", String(ref.name)),
3601 ),
3602 set: { last_health: result, updated_at: new Date() },
3603 })
3604 .pipe(Effect.ignore);
3605
3606 const healthFromCredentialResolutionFailure = (
3607 failure: CredentialResolutionError,

Callers 1

connectionCheckHealthFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected