(
slug: IntegrationSlug,
spec: HealthCheckSpec | null,
)
| 3466 | // No plugin hook, no config read-modify-write, nothing a plugin's own |
| 3467 | // config cycle can clobber. |
| 3468 | const integrationSetHealthCheck = ( |
| 3469 | slug: IntegrationSlug, |
| 3470 | spec: HealthCheckSpec | null, |
| 3471 | ): Effect.Effect<void, IntegrationNotFoundError | OrgWriteDeniedError | StorageFailure> => |
| 3472 | transaction( |
| 3473 | Effect.gen(function* () { |
| 3474 | yield* guardOrgWrite(); |
| 3475 | const row = yield* findIntegrationRow(slug); |
| 3476 | if (!row) return yield* new IntegrationNotFoundError({ slug }); |
| 3477 | yield* core.updateMany("integration", { |
| 3478 | where: (b: AnyCb) => b("slug", "=", String(slug)), |
| 3479 | set: { health_check: spec, updated_at: new Date() }, |
| 3480 | }); |
| 3481 | }), |
| 3482 | ); |
| 3483 | |
| 3484 | // ------------------------------------------------------------------ |
| 3485 | // Per-connection tool production |
no test coverage detected