mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-02 12:06:56 +08:00
refactor(redis): invoke redis_conn() method instead of cloning redis_conn property in StorageInterface (#1552)
Co-authored-by: jeeva <jeeva.ramu@codurance.com> Co-authored-by: Sanchith Hegde <22217505+SanchithHegde@users.noreply.github.com>
This commit is contained in:
@ -106,12 +106,22 @@ impl PubSubInterface for redis_interface::RedisConnectionPool {
|
||||
}
|
||||
|
||||
pub trait RedisConnInterface {
|
||||
fn get_redis_conn(&self) -> Arc<redis_interface::RedisConnectionPool>;
|
||||
fn get_redis_conn(
|
||||
&self,
|
||||
) -> common_utils::errors::CustomResult<
|
||||
Arc<redis_interface::RedisConnectionPool>,
|
||||
errors::RedisError,
|
||||
>;
|
||||
}
|
||||
|
||||
impl RedisConnInterface for Store {
|
||||
fn get_redis_conn(&self) -> Arc<redis_interface::RedisConnectionPool> {
|
||||
self.redis_conn.clone()
|
||||
fn get_redis_conn(
|
||||
&self,
|
||||
) -> common_utils::errors::CustomResult<
|
||||
Arc<redis_interface::RedisConnectionPool>,
|
||||
errors::RedisError,
|
||||
> {
|
||||
self.redis_conn()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user