(
slug: IntegrationSlug,
spec: HealthCheckSpec | null,
)
| 3215 | // No plugin hook, no config read-modify-write, nothing a plugin's own |
| 3216 | // config cycle can clobber. |
| 3217 | const integrationSetHealthCheck = ( |
| 3218 | slug: IntegrationSlug, |
| 3219 | spec: HealthCheckSpec | null, |
| 3220 | ): Effect.Effect<void, IntegrationNotFoundError | StorageFailure> => |
| 3221 | Effect.gen(function* () { |
| 3222 | const row = yield* findIntegrationRow(slug); |
| 3223 | if (!row) return yield* new IntegrationNotFoundError({ slug }); |
| 3224 | yield* core.updateMany("integration", { |
| 3225 | where: (b: AnyCb) => b("slug", "=", String(slug)), |
| 3226 | set: { health_check: spec, updated_at: new Date() }, |
| 3227 | }); |
| 3228 | }); |
| 3229 | |
| 3230 | // ------------------------------------------------------------------ |
| 3231 | // Per-connection tool production |
no test coverage detected