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

Function integrationSetHealthCheck

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

Source from the content-addressed store, hash-verified

3045 // No plugin hook, no config read-modify-write, nothing a plugin's own
3046 // config cycle can clobber.
3047 const integrationSetHealthCheck = (
3048 slug: IntegrationSlug,
3049 spec: HealthCheckSpec | null,
3050 ): Effect.Effect<void, IntegrationNotFoundError | StorageFailure> =>
3051 Effect.gen(function* () {
3052 const row = yield* findIntegrationRow(slug);
3053 if (!row) return yield* new IntegrationNotFoundError({ slug });
3054 yield* core.updateMany("integration", {
3055 where: (b: AnyCb) => b("slug", "=", String(slug)),
3056 set: { health_check: spec, updated_at: new Date() },
3057 });
3058 });
3059
3060 // ------------------------------------------------------------------
3061 // Per-connection tool production

Callers 1

createExecutorFunction · 0.85

Calls 1

findIntegrationRowFunction · 0.85

Tested by

no test coverage detected