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

Function integrationSetHealthCheck

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

Source from the content-addressed store, hash-verified

2042 // No plugin hook, no config read-modify-write, nothing a plugin's own
2043 // config cycle can clobber.
2044 const integrationSetHealthCheck = (
2045 slug: IntegrationSlug,
2046 spec: HealthCheckSpec | null,
2047 ): Effect.Effect<void, IntegrationNotFoundError | StorageFailure> =>
2048 Effect.gen(function* () {
2049 const row = yield* findIntegrationRow(slug);
2050 if (!row) return yield* new IntegrationNotFoundError({ slug });
2051 yield* core.updateMany("integration", {
2052 where: (b: AnyCb) => b("slug", "=", String(slug)),
2053 set: { health_check: spec, updated_at: new Date() },
2054 });
2055 });
2056
2057 // ------------------------------------------------------------------
2058 // Per-connection tool production

Callers 1

createExecutorFunction · 0.85

Calls 1

findIntegrationRowFunction · 0.85

Tested by

no test coverage detected