(
slug: IntegrationSlug,
spec: HealthCheckSpec | null,
)
| 2465 | // No plugin hook, no config read-modify-write, nothing a plugin's own |
| 2466 | // config cycle can clobber. |
| 2467 | const integrationSetHealthCheck = ( |
| 2468 | slug: IntegrationSlug, |
| 2469 | spec: HealthCheckSpec | null, |
| 2470 | ): Effect.Effect<void, IntegrationNotFoundError | StorageFailure> => |
| 2471 | Effect.gen(function* () { |
| 2472 | const row = yield* findIntegrationRow(slug); |
| 2473 | if (!row) return yield* new IntegrationNotFoundError({ slug }); |
| 2474 | yield* core.updateMany("integration", { |
| 2475 | where: (b: AnyCb) => b("slug", "=", String(slug)), |
| 2476 | set: { health_check: spec, updated_at: new Date() }, |
| 2477 | }); |
| 2478 | }); |
| 2479 | |
| 2480 | // ------------------------------------------------------------------ |
| 2481 | // Per-connection tool production |
no test coverage detected