(
slug: IntegrationSlug,
spec: HealthCheckSpec | null,
)
| 1986 | // No plugin hook, no config read-modify-write, nothing a plugin's own |
| 1987 | // config cycle can clobber. |
| 1988 | const integrationSetHealthCheck = ( |
| 1989 | slug: IntegrationSlug, |
| 1990 | spec: HealthCheckSpec | null, |
| 1991 | ): Effect.Effect<void, IntegrationNotFoundError | StorageFailure> => |
| 1992 | Effect.gen(function* () { |
| 1993 | const row = yield* findIntegrationRow(slug); |
| 1994 | if (!row) return yield* new IntegrationNotFoundError({ slug }); |
| 1995 | yield* core.updateMany("integration", { |
| 1996 | where: (b: AnyCb) => b("slug", "=", String(slug)), |
| 1997 | set: { health_check: spec, updated_at: new Date() }, |
| 1998 | }); |
| 1999 | }); |
| 2000 | |
| 2001 | // ------------------------------------------------------------------ |
| 2002 | // Per-connection tool production |
no test coverage detected