(
ref: ConnectionRef,
result: HealthCheckResult,
)
| 3081 | const unknownHealth = (): HealthCheckResult => ({ status: "unknown", checkedAt: Date.now() }); |
| 3082 | |
| 3083 | const persistHealthResult = ( |
| 3084 | ref: ConnectionRef, |
| 3085 | result: HealthCheckResult, |
| 3086 | ): Effect.Effect<void, never> => |
| 3087 | core |
| 3088 | .updateMany("connection", { |
| 3089 | where: (b: AnyCb) => |
| 3090 | b.and( |
| 3091 | b("owner", "=", String(ref.owner)), |
| 3092 | b("integration", "=", String(ref.integration)), |
| 3093 | b("name", "=", String(ref.name)), |
| 3094 | ), |
| 3095 | set: { last_health: result, updated_at: new Date() }, |
| 3096 | }) |
| 3097 | .pipe(Effect.ignore); |
| 3098 | |
| 3099 | const healthFromCredentialResolutionError = ( |
| 3100 | err: CredentialResolutionError, |
no outgoing calls
no test coverage detected