(
slug: IntegrationSlug,
spec: HealthCheckSpec | null,
)
| 2026 | // No plugin hook, no config read-modify-write, nothing a plugin's own |
| 2027 | // config cycle can clobber. |
| 2028 | const integrationSetHealthCheck = ( |
| 2029 | slug: IntegrationSlug, |
| 2030 | spec: HealthCheckSpec | null, |
| 2031 | ): Effect.Effect<void, IntegrationNotFoundError | StorageFailure> => |
| 2032 | Effect.gen(function* () { |
| 2033 | const row = yield* findIntegrationRow(slug); |
| 2034 | if (!row) return yield* new IntegrationNotFoundError({ slug }); |
| 2035 | yield* core.updateMany("integration", { |
| 2036 | where: (b: AnyCb) => b("slug", "=", String(slug)), |
| 2037 | set: { health_check: spec, updated_at: new Date() }, |
| 2038 | }); |
| 2039 | }); |
| 2040 | |
| 2041 | // ------------------------------------------------------------------ |
| 2042 | // Per-connection tool production |
no test coverage detected