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

Function integrationSetHealthCheck

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

Source from the content-addressed store, hash-verified

2026 // No plugin hook, no config read-modify-write, nothing a plugin's own
2027 // config cycle can clobber.
2028 const integrationSetHealthCheck = (
2029 slug: IntegrationSlug,
2030 spec: HealthCheckSpec | null,
2031 ): Effect.Effect<void, IntegrationNotFoundError | StorageFailure> =>
2032 Effect.gen(function* () {
2033 const row = yield* findIntegrationRow(slug);
2034 if (!row) return yield* new IntegrationNotFoundError({ slug });
2035 yield* core.updateMany("integration", {
2036 where: (b: AnyCb) => b("slug", "=", String(slug)),
2037 set: { health_check: spec, updated_at: new Date() },
2038 });
2039 });
2040
2041 // ------------------------------------------------------------------
2042 // Per-connection tool production

Callers 1

createExecutorFunction · 0.85

Calls 1

findIntegrationRowFunction · 0.85

Tested by

no test coverage detected