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

Function persistHealthResult

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

Source from the content-addressed store, hash-verified

3162 const unknownHealth = (): HealthCheckResult => ({ status: "unknown", checkedAt: Date.now() });
3163
3164 const persistHealthResult = (
3165 ref: ConnectionRef,
3166 result: HealthCheckResult,
3167 ): Effect.Effect<void, never> =>
3168 core
3169 .updateMany("connection", {
3170 where: (b: AnyCb) =>
3171 b.and(
3172 b("owner", "=", String(ref.owner)),
3173 b("integration", "=", String(ref.integration)),
3174 b("name", "=", String(ref.name)),
3175 ),
3176 set: { last_health: result, updated_at: new Date() },
3177 })
3178 .pipe(Effect.ignore);
3179
3180 const healthFromCredentialResolutionError = (
3181 err: CredentialResolutionError,

Callers 1

connectionCheckHealthFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected