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

Function persistHealthResult

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

Source from the content-addressed store, hash-verified

2804 const unknownHealth = (): HealthCheckResult => ({ status: "unknown", checkedAt: Date.now() });
2805
2806 const persistHealthResult = (
2807 ref: ConnectionRef,
2808 result: HealthCheckResult,
2809 ): Effect.Effect<void, never> =>
2810 core
2811 .updateMany("connection", {
2812 where: (b: AnyCb) =>
2813 b.and(
2814 b("owner", "=", String(ref.owner)),
2815 b("integration", "=", String(ref.integration)),
2816 b("name", "=", String(ref.name)),
2817 ),
2818 set: { last_health: result, updated_at: new Date() },
2819 })
2820 .pipe(Effect.ignore);
2821
2822 const healthFromCredentialResolutionError = (
2823 err: CredentialResolutionError,

Callers 1

connectionCheckHealthFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected