feat(process_tracker): make long standing payments failed (#2380)

Co-authored-by: Arun Raj M <jarnura47@gmail.com>
This commit is contained in:
Narayan Bhat
2023-10-09 14:32:46 +05:30
committed by GitHub
parent 17393f5be3
commit 73dfc31f9d
7 changed files with 271 additions and 86 deletions

View File

@ -298,6 +298,7 @@ pub fn get_schedule_time(
None => mapping.default_mapping,
};
// For first try, get the `start_after` time
if retry_count == 0 {
Some(mapping.start_after)
} else {
@ -328,6 +329,7 @@ pub fn get_pm_schedule_time(
}
}
/// Get the delay based on the retry count
fn get_delay<'a>(
retry_count: i32,
mut array: impl Iterator<Item = (&'a i32, &'a i32)>,