(
ref: ConnectionRef,
result: HealthCheckResult,
)
| 3162 | const unknownHealth = (): HealthCheckResult => ({ status: "unknown", checkedAt: Date.now() }); |
| 3163 | |
| 3164 | const persistHealthResult = ( |
| 3165 | ref: ConnectionRef, |
| 3166 | result: HealthCheckResult, |
| 3167 | ): Effect.Effect<void, never> => |
| 3168 | core |
| 3169 | .updateMany("connection", { |
| 3170 | where: (b: AnyCb) => |
| 3171 | b.and( |
| 3172 | b("owner", "=", String(ref.owner)), |
| 3173 | b("integration", "=", String(ref.integration)), |
| 3174 | b("name", "=", String(ref.name)), |
| 3175 | ), |
| 3176 | set: { last_health: result, updated_at: new Date() }, |
| 3177 | }) |
| 3178 | .pipe(Effect.ignore); |
| 3179 | |
| 3180 | const healthFromCredentialResolutionError = ( |
| 3181 | err: CredentialResolutionError, |
no outgoing calls
no test coverage detected