(
slug: IntegrationSlug,
spec: HealthCheckSpec | null,
)
| 2847 | // No plugin hook, no config read-modify-write, nothing a plugin's own |
| 2848 | // config cycle can clobber. |
| 2849 | const integrationSetHealthCheck = ( |
| 2850 | slug: IntegrationSlug, |
| 2851 | spec: HealthCheckSpec | null, |
| 2852 | ): Effect.Effect<void, IntegrationNotFoundError | StorageFailure> => |
| 2853 | Effect.gen(function* () { |
| 2854 | const row = yield* findIntegrationRow(slug); |
| 2855 | if (!row) return yield* new IntegrationNotFoundError({ slug }); |
| 2856 | yield* core.updateMany("integration", { |
| 2857 | where: (b: AnyCb) => b("slug", "=", String(slug)), |
| 2858 | set: { health_check: spec, updated_at: new Date() }, |
| 2859 | }); |
| 2860 | }); |
| 2861 | |
| 2862 | // ------------------------------------------------------------------ |
| 2863 | // Per-connection tool production |
no test coverage detected