mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-03 05:17:02 +08:00
db: Added Reverse lookup table (#147)
This commit is contained in:
@ -25,7 +25,7 @@ async fn drainer_handler(
|
||||
stream_index: u8,
|
||||
max_read_count: u64,
|
||||
) -> errors::DrainerResult<()> {
|
||||
let stream_name = utils::get_drainer_stream(store.clone(), stream_index);
|
||||
let stream_name = utils::get_drainer_stream_name(store.clone(), stream_index);
|
||||
let drainer_result = drainer(store.clone(), max_read_count, stream_name.as_str()).await;
|
||||
|
||||
if let Err(_e) = drainer_result {
|
||||
@ -70,6 +70,9 @@ async fn drainer(
|
||||
kv::Insertable::PaymentAttempt(a) => {
|
||||
macro_util::handle_resp!(a.insert(&conn).await, "ins", "pa")
|
||||
}
|
||||
kv::Insertable::Refund(a) => {
|
||||
macro_util::handle_resp!(a.insert(&conn).await, "ins", "ref")
|
||||
}
|
||||
},
|
||||
kv::DBOperation::Update { updatable } => match updatable {
|
||||
kv::Updateable::PaymentIntentUpdate(a) => {
|
||||
@ -78,6 +81,9 @@ async fn drainer(
|
||||
kv::Updateable::PaymentAttemptUpdate(a) => {
|
||||
macro_util::handle_resp!(a.orig.update(&conn, a.update_data).await, "up", "pa")
|
||||
}
|
||||
kv::Updateable::RefundUpdate(a) => {
|
||||
macro_util::handle_resp!(a.orig.update(&conn, a.update_data).await, "up", "ref")
|
||||
}
|
||||
},
|
||||
kv::DBOperation::Delete => todo!(),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user