(
slug: IntegrationSlug,
spec: HealthCheckSpec | null,
)
| 2117 | // No plugin hook, no config read-modify-write, nothing a plugin's own |
| 2118 | // config cycle can clobber. |
| 2119 | const integrationSetHealthCheck = ( |
| 2120 | slug: IntegrationSlug, |
| 2121 | spec: HealthCheckSpec | null, |
| 2122 | ): Effect.Effect<void, IntegrationNotFoundError | StorageFailure> => |
| 2123 | Effect.gen(function* () { |
| 2124 | const row = yield* findIntegrationRow(slug); |
| 2125 | if (!row) return yield* new IntegrationNotFoundError({ slug }); |
| 2126 | yield* core.updateMany("integration", { |
| 2127 | where: (b: AnyCb) => b("slug", "=", String(slug)), |
| 2128 | set: { health_check: spec, updated_at: new Date() }, |
| 2129 | }); |
| 2130 | }); |
| 2131 | |
| 2132 | // ------------------------------------------------------------------ |
| 2133 | // Per-connection tool production |
no test coverage detected