Skip to content

Commit

Permalink
fetch_add: Remove jitter
Browse files Browse the repository at this point in the history
  • Loading branch information
akiradeveloper committed May 24, 2024
1 parent ca0529a commit 70ebf1f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/testapp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,13 @@ impl Client {
request_id,
};

use tokio_retry::strategy::{jitter, ExponentialBackoff};
use tokio_retry::strategy::ExponentialBackoff;
use tokio_retry::Retry;

// 200ms, 400, 800, 1600, 3200
let strategy = ExponentialBackoff::from_millis(2)
.factor(100)
.map(jitter)
.take(5);
.take(8);

let fut = Retry::spawn(strategy, || {
let mut cli = self.cli.clone();
Expand Down

0 comments on commit 70ebf1f

Please sign in to comment.