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

Function integrationSetHealthCheck

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

Source from the content-addressed store, hash-verified

2479 // No plugin hook, no config read-modify-write, nothing a plugin's own
2480 // config cycle can clobber.
2481 const integrationSetHealthCheck = (
2482 slug: IntegrationSlug,
2483 spec: HealthCheckSpec | null,
2484 ): Effect.Effect<void, IntegrationNotFoundError | StorageFailure> =>
2485 Effect.gen(function* () {
2486 const row = yield* findIntegrationRow(slug);
2487 if (!row) return yield* new IntegrationNotFoundError({ slug });
2488 yield* core.updateMany("integration", {
2489 where: (b: AnyCb) => b("slug", "=", String(slug)),
2490 set: { health_check: spec, updated_at: new Date() },
2491 });
2492 });
2493
2494 // ------------------------------------------------------------------
2495 // Per-connection tool production

Callers 1

createExecutorFunction · 0.85

Calls 1

findIntegrationRowFunction · 0.85

Tested by

no test coverage detected