(
slug: IntegrationSlug,
spec: HealthCheckSpec | null,
)
| 2479 | // No plugin hook, no config read-modify-write, nothing a plugin's own |
| 2480 | // config cycle can clobber. |
| 2481 | const integrationSetHealthCheck = ( |
| 2482 | slug: IntegrationSlug, |
| 2483 | spec: HealthCheckSpec | null, |
| 2484 | ): Effect.Effect<void, IntegrationNotFoundError | StorageFailure> => |
| 2485 | Effect.gen(function* () { |
| 2486 | const row = yield* findIntegrationRow(slug); |
| 2487 | if (!row) return yield* new IntegrationNotFoundError({ slug }); |
| 2488 | yield* core.updateMany("integration", { |
| 2489 | where: (b: AnyCb) => b("slug", "=", String(slug)), |
| 2490 | set: { health_check: spec, updated_at: new Date() }, |
| 2491 | }); |
| 2492 | }); |
| 2493 | |
| 2494 | // ------------------------------------------------------------------ |
| 2495 | // Per-connection tool production |
no test coverage detected