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

Function integrationSetHealthCheck

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

Source from the content-addressed store, hash-verified

2525 // No plugin hook, no config read-modify-write, nothing a plugin's own
2526 // config cycle can clobber.
2527 const integrationSetHealthCheck = (
2528 slug: IntegrationSlug,
2529 spec: HealthCheckSpec | null,
2530 ): Effect.Effect<void, IntegrationNotFoundError | StorageFailure> =>
2531 Effect.gen(function* () {
2532 const row = yield* findIntegrationRow(slug);
2533 if (!row) return yield* new IntegrationNotFoundError({ slug });
2534 yield* core.updateMany("integration", {
2535 where: (b: AnyCb) => b("slug", "=", String(slug)),
2536 set: { health_check: spec, updated_at: new Date() },
2537 });
2538 });
2539
2540 // ------------------------------------------------------------------
2541 // Per-connection tool production

Callers 1

createExecutorFunction · 0.85

Calls 1

findIntegrationRowFunction · 0.85

Tested by

no test coverage detected