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

Function integrationSetHealthCheck

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

Source from the content-addressed store, hash-verified

3215 // No plugin hook, no config read-modify-write, nothing a plugin's own
3216 // config cycle can clobber.
3217 const integrationSetHealthCheck = (
3218 slug: IntegrationSlug,
3219 spec: HealthCheckSpec | null,
3220 ): Effect.Effect<void, IntegrationNotFoundError | StorageFailure> =>
3221 Effect.gen(function* () {
3222 const row = yield* findIntegrationRow(slug);
3223 if (!row) return yield* new IntegrationNotFoundError({ slug });
3224 yield* core.updateMany("integration", {
3225 where: (b: AnyCb) => b("slug", "=", String(slug)),
3226 set: { health_check: spec, updated_at: new Date() },
3227 });
3228 });
3229
3230 // ------------------------------------------------------------------
3231 // Per-connection tool production

Callers 1

createExecutorFunction · 0.85

Calls 1

findIntegrationRowFunction · 0.85

Tested by

no test coverage detected