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

Function integrationSetHealthCheck

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

Source from the content-addressed store, hash-verified

2117 // No plugin hook, no config read-modify-write, nothing a plugin's own
2118 // config cycle can clobber.
2119 const integrationSetHealthCheck = (
2120 slug: IntegrationSlug,
2121 spec: HealthCheckSpec | null,
2122 ): Effect.Effect<void, IntegrationNotFoundError | StorageFailure> =>
2123 Effect.gen(function* () {
2124 const row = yield* findIntegrationRow(slug);
2125 if (!row) return yield* new IntegrationNotFoundError({ slug });
2126 yield* core.updateMany("integration", {
2127 where: (b: AnyCb) => b("slug", "=", String(slug)),
2128 set: { health_check: spec, updated_at: new Date() },
2129 });
2130 });
2131
2132 // ------------------------------------------------------------------
2133 // Per-connection tool production

Callers 1

createExecutorFunction · 0.85

Calls 1

findIntegrationRowFunction · 0.85

Tested by

no test coverage detected