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

Function persistHealthResult

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

Source from the content-addressed store, hash-verified

3805 const unknownHealth = (): HealthCheckResult => ({ status: "unknown", checkedAt: Date.now() });
3806
3807 const persistHealthResult = (
3808 ref: ConnectionRef,
3809 result: HealthCheckResult,
3810 ): Effect.Effect<void, never> =>
3811 core
3812 .updateMany("connection", {
3813 where: (b: AnyCb) =>
3814 b.and(
3815 b("owner", "=", String(ref.owner)),
3816 b("integration", "=", String(ref.integration)),
3817 b("name", "=", String(ref.name)),
3818 ),
3819 set: { last_health: result, updated_at: new Date() },
3820 })
3821 .pipe(Effect.ignore);
3822
3823 const healthFromCredentialResolutionFailure = (
3824 failure: CredentialResolutionError,

Callers 1

connectionCheckHealthFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected