2022-08-16 01:50:56 +03:00
|
|
|
pub use bb8_redis::bb8::ErrorSink as Bb8ErrorSync;
|
|
|
|
pub use bb8_redis::redis::RedisError;
|
|
|
|
|
2022-09-06 23:12:45 +03:00
|
|
|
use tracing::error;
|
2022-08-16 01:50:56 +03:00
|
|
|
|
|
|
|
#[derive(Debug, Clone)]
|
|
|
|
pub struct RedisErrorSink;
|
|
|
|
|
|
|
|
impl Bb8ErrorSync<RedisError> for RedisErrorSink {
|
|
|
|
fn sink(&self, err: RedisError) {
|
2022-09-06 23:12:45 +03:00
|
|
|
error!(?err, "redis error");
|
2022-08-16 01:50:56 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
fn boxed_clone(&self) -> Box<dyn Bb8ErrorSync<RedisError>> {
|
|
|
|
Box::new(self.clone())
|
|
|
|
}
|
|
|
|
}
|