2022-07-26 07:53:38 +03:00
|
|
|
// TODO: move this into redis-cell-client
|
|
|
|
|
2022-07-11 22:16:18 +03:00
|
|
|
use redis_cell_client::bb8;
|
|
|
|
use tracing::warn;
|
|
|
|
|
|
|
|
#[derive(Debug, Clone)]
|
|
|
|
pub struct RedisErrorSink;
|
|
|
|
|
|
|
|
impl bb8::ErrorSink<redis_cell_client::RedisError> for RedisErrorSink {
|
|
|
|
fn sink(&self, err: redis_cell_client::RedisError) {
|
|
|
|
warn!(?err, "redis error");
|
|
|
|
}
|
|
|
|
|
|
|
|
fn boxed_clone(&self) -> Box<dyn bb8::ErrorSink<redis_cell_client::RedisError>> {
|
|
|
|
Box::new(self.clone())
|
|
|
|
}
|
|
|
|
}
|