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

Function integrationSetHealthCheck

packages/core/sdk/src/executor.ts:1988–1999  ·  view source on GitHub ↗
(
      slug: IntegrationSlug,
      spec: HealthCheckSpec | null,
    )

Source from the content-addressed store, hash-verified

1986 // No plugin hook, no config read-modify-write, nothing a plugin's own
1987 // config cycle can clobber.
1988 const integrationSetHealthCheck = (
1989 slug: IntegrationSlug,
1990 spec: HealthCheckSpec | null,
1991 ): Effect.Effect<void, IntegrationNotFoundError | StorageFailure> =>
1992 Effect.gen(function* () {
1993 const row = yield* findIntegrationRow(slug);
1994 if (!row) return yield* new IntegrationNotFoundError({ slug });
1995 yield* core.updateMany("integration", {
1996 where: (b: AnyCb) => b("slug", "=", String(slug)),
1997 set: { health_check: spec, updated_at: new Date() },
1998 });
1999 });
2000
2001 // ------------------------------------------------------------------
2002 // Per-connection tool production

Callers 1

createExecutorFunction · 0.85

Calls 1

findIntegrationRowFunction · 0.85

Tested by

no test coverage detected