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

Function integrationSetHealthCheck

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

Source from the content-addressed store, hash-verified

2465 // No plugin hook, no config read-modify-write, nothing a plugin's own
2466 // config cycle can clobber.
2467 const integrationSetHealthCheck = (
2468 slug: IntegrationSlug,
2469 spec: HealthCheckSpec | null,
2470 ): Effect.Effect<void, IntegrationNotFoundError | StorageFailure> =>
2471 Effect.gen(function* () {
2472 const row = yield* findIntegrationRow(slug);
2473 if (!row) return yield* new IntegrationNotFoundError({ slug });
2474 yield* core.updateMany("integration", {
2475 where: (b: AnyCb) => b("slug", "=", String(slug)),
2476 set: { health_check: spec, updated_at: new Date() },
2477 });
2478 });
2479
2480 // ------------------------------------------------------------------
2481 // Per-connection tool production

Callers 1

createExecutorFunction · 0.85

Calls 1

findIntegrationRowFunction · 0.85

Tested by

no test coverage detected