(
ref: ConnectionRef,
result: HealthCheckResult,
)
| 3805 | const unknownHealth = (): HealthCheckResult => ({ status: "unknown", checkedAt: Date.now() }); |
| 3806 | |
| 3807 | const persistHealthResult = ( |
| 3808 | ref: ConnectionRef, |
| 3809 | result: HealthCheckResult, |
| 3810 | ): Effect.Effect<void, never> => |
| 3811 | core |
| 3812 | .updateMany("connection", { |
| 3813 | where: (b: AnyCb) => |
| 3814 | b.and( |
| 3815 | b("owner", "=", String(ref.owner)), |
| 3816 | b("integration", "=", String(ref.integration)), |
| 3817 | b("name", "=", String(ref.name)), |
| 3818 | ), |
| 3819 | set: { last_health: result, updated_at: new Date() }, |
| 3820 | }) |
| 3821 | .pipe(Effect.ignore); |
| 3822 | |
| 3823 | const healthFromCredentialResolutionFailure = ( |
| 3824 | failure: CredentialResolutionError, |
no outgoing calls
no test coverage detected