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:
Jeeva
2023-08-01 09:04:38 +02:00
committed by GitHub
parent 2c9c8f081d
commit f32fdec290
13 changed files with 136 additions and 19 deletions

View File

@ -46,7 +46,12 @@ pub async fn make_payout_method_data<'a>(
)
);
let redis_conn = state.store.get_redis_conn();
let redis_conn = state
.store
.get_redis_conn()
.change_context(errors::ApiErrorResponse::InternalServerError)
.attach_printable("Failed to get redis connection")?;
let hyperswitch_token_option = redis_conn
.get_key::<Option<String>>(&key)
.await