(
slug: IntegrationSlug,
spec: HealthCheckSpec | null,
)
| 2525 | // No plugin hook, no config read-modify-write, nothing a plugin's own |
| 2526 | // config cycle can clobber. |
| 2527 | const integrationSetHealthCheck = ( |
| 2528 | slug: IntegrationSlug, |
| 2529 | spec: HealthCheckSpec | null, |
| 2530 | ): Effect.Effect<void, IntegrationNotFoundError | StorageFailure> => |
| 2531 | Effect.gen(function* () { |
| 2532 | const row = yield* findIntegrationRow(slug); |
| 2533 | if (!row) return yield* new IntegrationNotFoundError({ slug }); |
| 2534 | yield* core.updateMany("integration", { |
| 2535 | where: (b: AnyCb) => b("slug", "=", String(slug)), |
| 2536 | set: { health_check: spec, updated_at: new Date() }, |
| 2537 | }); |
| 2538 | }); |
| 2539 | |
| 2540 | // ------------------------------------------------------------------ |
| 2541 | // Per-connection tool production |
no test coverage detected