(
ref: ConnectionRef,
result: HealthCheckResult,
)
| 3588 | const unknownHealth = (): HealthCheckResult => ({ status: "unknown", checkedAt: Date.now() }); |
| 3589 | |
| 3590 | const persistHealthResult = ( |
| 3591 | ref: ConnectionRef, |
| 3592 | result: HealthCheckResult, |
| 3593 | ): Effect.Effect<void, never> => |
| 3594 | core |
| 3595 | .updateMany("connection", { |
| 3596 | where: (b: AnyCb) => |
| 3597 | b.and( |
| 3598 | b("owner", "=", String(ref.owner)), |
| 3599 | b("integration", "=", String(ref.integration)), |
| 3600 | b("name", "=", String(ref.name)), |
| 3601 | ), |
| 3602 | set: { last_health: result, updated_at: new Date() }, |
| 3603 | }) |
| 3604 | .pipe(Effect.ignore); |
| 3605 | |
| 3606 | const healthFromCredentialResolutionFailure = ( |
| 3607 | failure: CredentialResolutionError, |
no outgoing calls
no test coverage detected