(
ref: ConnectionRef,
result: HealthCheckResult,
)
| 2705 | const unknownHealth = (): HealthCheckResult => ({ status: "unknown", checkedAt: Date.now() }); |
| 2706 | |
| 2707 | const persistHealthResult = ( |
| 2708 | ref: ConnectionRef, |
| 2709 | result: HealthCheckResult, |
| 2710 | ): Effect.Effect<void, never> => |
| 2711 | core |
| 2712 | .updateMany("connection", { |
| 2713 | where: (b: AnyCb) => |
| 2714 | b.and( |
| 2715 | b("owner", "=", String(ref.owner)), |
| 2716 | b("integration", "=", String(ref.integration)), |
| 2717 | b("name", "=", String(ref.name)), |
| 2718 | ), |
| 2719 | set: { last_health: result, updated_at: new Date() }, |
| 2720 | }) |
| 2721 | .pipe(Effect.ignore); |
| 2722 | |
| 2723 | const healthFromCredentialResolutionError = ( |
| 2724 | err: CredentialResolutionError, |
no outgoing calls
no test coverage detected