(
slug: IntegrationSlug,
spec: HealthCheckSpec | null,
)
| 3408 | // No plugin hook, no config read-modify-write, nothing a plugin's own |
| 3409 | // config cycle can clobber. |
| 3410 | const integrationSetHealthCheck = ( |
| 3411 | slug: IntegrationSlug, |
| 3412 | spec: HealthCheckSpec | null, |
| 3413 | ): Effect.Effect<void, IntegrationNotFoundError | OrgWriteDeniedError | StorageFailure> => |
| 3414 | transaction( |
| 3415 | Effect.gen(function* () { |
| 3416 | yield* guardOrgWrite(); |
| 3417 | const row = yield* findIntegrationRow(slug); |
| 3418 | if (!row) return yield* new IntegrationNotFoundError({ slug }); |
| 3419 | yield* core.updateMany("integration", { |
| 3420 | where: (b: AnyCb) => b("slug", "=", String(slug)), |
| 3421 | set: { health_check: spec, updated_at: new Date() }, |
| 3422 | }); |
| 3423 | }), |
| 3424 | ); |
| 3425 | |
| 3426 | // ------------------------------------------------------------------ |
| 3427 | // Per-connection tool production |
no test coverage detected