(
slug: IntegrationSlug,
spec: HealthCheckSpec | null,
)
| 2384 | // No plugin hook, no config read-modify-write, nothing a plugin's own |
| 2385 | // config cycle can clobber. |
| 2386 | const integrationSetHealthCheck = ( |
| 2387 | slug: IntegrationSlug, |
| 2388 | spec: HealthCheckSpec | null, |
| 2389 | ): Effect.Effect<void, IntegrationNotFoundError | StorageFailure> => |
| 2390 | Effect.gen(function* () { |
| 2391 | const row = yield* findIntegrationRow(slug); |
| 2392 | if (!row) return yield* new IntegrationNotFoundError({ slug }); |
| 2393 | yield* core.updateMany("integration", { |
| 2394 | where: (b: AnyCb) => b("slug", "=", String(slug)), |
| 2395 | set: { health_check: spec, updated_at: new Date() }, |
| 2396 | }); |
| 2397 | }); |
| 2398 | |
| 2399 | // ------------------------------------------------------------------ |
| 2400 | // Per-connection tool production |
no test coverage detected