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

Function persistHealthResult

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

Source from the content-addressed store, hash-verified

3181 const unknownHealth = (): HealthCheckResult => ({ status: "unknown", checkedAt: Date.now() });
3182
3183 const persistHealthResult = (
3184 ref: ConnectionRef,
3185 result: HealthCheckResult,
3186 ): Effect.Effect<void, never> =>
3187 core
3188 .updateMany("connection", {
3189 where: (b: AnyCb) =>
3190 b.and(
3191 b("owner", "=", String(ref.owner)),
3192 b("integration", "=", String(ref.integration)),
3193 b("name", "=", String(ref.name)),
3194 ),
3195 set: { last_health: result, updated_at: new Date() },
3196 })
3197 .pipe(Effect.ignore);
3198
3199 const healthFromCredentialResolutionError = (
3200 err: CredentialResolutionError,

Callers 1

connectionCheckHealthFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected