(
ref: ConnectionRef,
result: HealthCheckResult,
)
| 3181 | const unknownHealth = (): HealthCheckResult => ({ status: "unknown", checkedAt: Date.now() }); |
| 3182 | |
| 3183 | const persistHealthResult = ( |
| 3184 | ref: ConnectionRef, |
| 3185 | result: HealthCheckResult, |
| 3186 | ): Effect.Effect<void, never> => |
| 3187 | core |
| 3188 | .updateMany("connection", { |
| 3189 | where: (b: AnyCb) => |
| 3190 | b.and( |
| 3191 | b("owner", "=", String(ref.owner)), |
| 3192 | b("integration", "=", String(ref.integration)), |
| 3193 | b("name", "=", String(ref.name)), |
| 3194 | ), |
| 3195 | set: { last_health: result, updated_at: new Date() }, |
| 3196 | }) |
| 3197 | .pipe(Effect.ignore); |
| 3198 | |
| 3199 | const healthFromCredentialResolutionError = ( |
| 3200 | err: CredentialResolutionError, |
no outgoing calls
no test coverage detected