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

Function persistHealthResult

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

Source from the content-addressed store, hash-verified

2721 const unknownHealth = (): HealthCheckResult => ({ status: "unknown", checkedAt: Date.now() });
2722
2723 const persistHealthResult = (
2724 ref: ConnectionRef,
2725 result: HealthCheckResult,
2726 ): Effect.Effect<void, never> =>
2727 core
2728 .updateMany("connection", {
2729 where: (b: AnyCb) =>
2730 b.and(
2731 b("owner", "=", String(ref.owner)),
2732 b("integration", "=", String(ref.integration)),
2733 b("name", "=", String(ref.name)),
2734 ),
2735 set: { last_health: result, updated_at: new Date() },
2736 })
2737 .pipe(Effect.ignore);
2738
2739 const healthFromCredentialResolutionError = (
2740 err: CredentialResolutionError,

Callers 1

connectionCheckHealthFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected