src: implement simulation data sources
This commit is contained in:
@@ -56,14 +56,14 @@ impl Backoff {
|
||||
'outer: loop {
|
||||
for attempt in self.attempts {
|
||||
match &latest {
|
||||
Err(_) => {
|
||||
Err(err) => {
|
||||
match attempt {
|
||||
Attempts::Finite(1) => {
|
||||
warn!("Operation failed on final attempt.");
|
||||
warn!("Operation failed on final attempt: {err:?}");
|
||||
break 'outer
|
||||
}
|
||||
attempt => {
|
||||
warn!("Operation failed. Retrying attempt {attempt:?} after {delay}");
|
||||
warn!("Operation failed: {err:?} Retrying attempt {attempt:?} after {delay}");
|
||||
Timer::after(delay).await;
|
||||
delay *= 2;
|
||||
latest = f().await
|
||||
|
||||
Reference in New Issue
Block a user