(
slug: IntegrationSlug,
spec: HealthCheckSpec | null,
)
| 2042 | // No plugin hook, no config read-modify-write, nothing a plugin's own |
| 2043 | // config cycle can clobber. |
| 2044 | const integrationSetHealthCheck = ( |
| 2045 | slug: IntegrationSlug, |
| 2046 | spec: HealthCheckSpec | null, |
| 2047 | ): Effect.Effect<void, IntegrationNotFoundError | StorageFailure> => |
| 2048 | Effect.gen(function* () { |
| 2049 | const row = yield* findIntegrationRow(slug); |
| 2050 | if (!row) return yield* new IntegrationNotFoundError({ slug }); |
| 2051 | yield* core.updateMany("integration", { |
| 2052 | where: (b: AnyCb) => b("slug", "=", String(slug)), |
| 2053 | set: { health_check: spec, updated_at: new Date() }, |
| 2054 | }); |
| 2055 | }); |
| 2056 | |
| 2057 | // ------------------------------------------------------------------ |
| 2058 | // Per-connection tool production |
no test coverage detected