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

Function integrationSetHealthCheck

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

Source from the content-addressed store, hash-verified

2384 // No plugin hook, no config read-modify-write, nothing a plugin's own
2385 // config cycle can clobber.
2386 const integrationSetHealthCheck = (
2387 slug: IntegrationSlug,
2388 spec: HealthCheckSpec | null,
2389 ): Effect.Effect<void, IntegrationNotFoundError | StorageFailure> =>
2390 Effect.gen(function* () {
2391 const row = yield* findIntegrationRow(slug);
2392 if (!row) return yield* new IntegrationNotFoundError({ slug });
2393 yield* core.updateMany("integration", {
2394 where: (b: AnyCb) => b("slug", "=", String(slug)),
2395 set: { health_check: spec, updated_at: new Date() },
2396 });
2397 });
2398
2399 // ------------------------------------------------------------------
2400 // Per-connection tool production

Callers 1

createExecutorFunction · 0.85

Calls 1

findIntegrationRowFunction · 0.85

Tested by

no test coverage detected