mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-02 04:04:43 +08:00
fix: fix bugs found when testing drainer (#512)
This commit is contained in:
@ -454,7 +454,7 @@ mod storage {
|
||||
|
||||
enums::MerchantStorageScheme::RedisKv => {
|
||||
let key = format!("{}_{}", this.merchant_id, this.payment_id);
|
||||
|
||||
let old_connector_transaction_id = &this.connector_transaction_id;
|
||||
let updated_attempt = payment_attempt.clone().apply_changeset(this.clone());
|
||||
// Check for database presence as well Maybe use a read replica here ?
|
||||
let redis_value = serde_json::to_string(&updated_attempt)
|
||||
@ -470,9 +470,10 @@ mod storage {
|
||||
|
||||
let conn = pg_connection(&self.master_pool).await;
|
||||
// Reverse lookup for connector_transaction_id
|
||||
if let Some(ref connector_transaction_id) =
|
||||
updated_attempt.connector_transaction_id
|
||||
{
|
||||
if let (None, Some(connector_transaction_id)) = (
|
||||
old_connector_transaction_id,
|
||||
&updated_attempt.connector_transaction_id,
|
||||
) {
|
||||
let field = format!("pa_{}", updated_attempt.attempt_id);
|
||||
ReverseLookupNew {
|
||||
lookup_id: format!(
|
||||
|
||||
Reference in New Issue
Block a user