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

Function persistHealthResult

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

Source from the content-addressed store, hash-verified

3081 const unknownHealth = (): HealthCheckResult => ({ status: "unknown", checkedAt: Date.now() });
3082
3083 const persistHealthResult = (
3084 ref: ConnectionRef,
3085 result: HealthCheckResult,
3086 ): Effect.Effect<void, never> =>
3087 core
3088 .updateMany("connection", {
3089 where: (b: AnyCb) =>
3090 b.and(
3091 b("owner", "=", String(ref.owner)),
3092 b("integration", "=", String(ref.integration)),
3093 b("name", "=", String(ref.name)),
3094 ),
3095 set: { last_health: result, updated_at: new Date() },
3096 })
3097 .pipe(Effect.ignore);
3098
3099 const healthFromCredentialResolutionError = (
3100 err: CredentialResolutionError,

Callers 1

connectionCheckHealthFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected