Skip to content

Releases: Xuanwo/backon

v1.0.2

27 Aug 03:24
v1.0.2
d217a58

Choose a tag to compare

What's Changed

Full Changelog: v1.0.1...v1.0.2

v1.0.1

26 Aug 12:56
v1.0.1
f2a9062

Choose a tag to compare

What's Changed

Full Changelog: v1.0.0...v1.0.1

v1.0.0

26 Aug 09:55
v1.0.0
ba6e069

Choose a tag to compare

Upgrade

Since 1.0.0, backon Retry doesn't take a reference of builder anymore:

+ your_fn.retry(ExponentialBuilder::default()).await;
- your_fn.retry(&ExponentialBuilder::default()).await;

Since version 0.5.0, backon no longer directly depends on tokio. Instead, users can now provide their own sleep implementation.

For example:

use anyhow::Result;
use backon::ExponentialBuilder;
use backon::Retryable;
use std::future::ready;

async fn main() -> Result<()> {
    let content = fetch
        .retry(&ExponentialBuilder::default())
        .sleep(tokio::time::sleep)
        .await?;
    Ok(())
}

To maintain the same behavior as before, please enable the tokio-sleep feature.

What's Changed

Full Changelog: v0.5.0...v1.0.0

v0.5.0

22 Aug 11:07
v0.5.0
d292fae

Choose a tag to compare

Upgrade

Since version 0.5.0, backon no longer directly depends on tokio. Instead, users can now provide their own sleep implementation.

For example:

use anyhow::Result;
use backon::ExponentialBuilder;
use backon::Retryable;
use std::future::ready;

async fn main() -> Result<()> {
    let content = fetch
        .retry(&ExponentialBuilder::default())
        .sleep(tokio::time::sleep)
        .await?;
    Ok(())
}

To maintain the same behavior as before, please enable the tokio-sleep feature.

What's Changed

  • Remove duplicate example, point to examples on docs index page by @matildasmeds in #84
  • ci: Use macos-latest for test by @Xuanwo in #87
  • feat: Remove dependences on pin_project and futures_core by @Xuanwo in #86
  • docs: Add an example for sqlx by @Xuanwo in #91
  • Use wasm-compatible sleep if compiled for wasm32 by @wackazong in #92
  • feat: Allow user to provide sleeper by @Xuanwo in #93
  • Bump to version 0.5.0 by @Xuanwo in #94

New Contributors

Full Changelog: v0.4.4...v0.5.0

v0.4.4

08 Apr 03:40
v0.4.4
7e90660

Choose a tag to compare

What's Changed

  • docs: Update README by @Xuanwo in #76
  • chore(deps): update reqwest requirement from 0.11 to 0.12 by @dependabot in #78
  • feat: Add blocking retry with context support by @Xuanwo in #80
  • Bump backon to 0.4.4 by @Xuanwo in #81

Full Changelog: v0.4.3...v0.4.4

v0.4.3

08 Mar 09:26
v0.4.3
fe815a8

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.4.2...v0.4.3

v0.4.2

21 Feb 10:45
v0.4.2
a5ba69f

Choose a tag to compare

What's Changed

  • fix: Make backon work in wasm by @Xuanwo in #60
  • chore(deps): update fastrand requirement from 1.9.0 to 2.0.0 by @dependabot in #62
  • chore(deps): bump actions/checkout from 3 to 4 by @dependabot in #64
  • docs: Document tokio::time::sleep usage by @vriesk in #66
  • fix: fix with_factor assert by @wcy-fdu in #68
  • Bump to version 0.4.2 by @Xuanwo in #69

New Contributors

Full Changelog: v0.4.1...v0.4.2

v0.4.1

19 May 05:36
v0.4.1
d7cd205

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.4.0...v0.4.1

v0.4.0

08 Feb 07:52
v0.4.0
691f361

Choose a tag to compare

What's Changed

  • refactor: Retryable should accept a reference by @Xuanwo in #33
  • Bump to version 0.4 by @Xuanwo in #34

Full Changelog: v0.3.1...v0.4.0

v0.3.1

08 Feb 07:20
v0.3.1
f902488

Choose a tag to compare

What's Changed

Full Changelog: v0.3.0...v0.3.1