Skip to content

Commit

Permalink
refactor(backend): migrate from backoff to backon (#356)
Browse files Browse the repository at this point in the history
Hello,

Removed the unmaintained  `backoff` crate in the `rustic_backend` crate.
Replaced it with the relatively similar `backon` crate.

If `backon` as simpler API, it also lacks a few features that `backoff`
had.
For instance: `no_max_delay` or `backoff::retry_notify`. 
To make up for it:
- I opened Xuanwo/backon#160 on the `backon`
github.
- I implemented an internal module `backon_extension` inside
`backend::rest`.

Let me know what you think of the code!

Fixes #351

---------

Co-authored-by: Alexander Weiss <[email protected]>
Co-authored-by: simonsan <[email protected]>
  • Loading branch information
3 people authored Nov 18, 2024
1 parent 749879f commit 80892c5
Show file tree
Hide file tree
Showing 3 changed files with 106 additions and 205 deletions.
22 changes: 1 addition & 21 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions crates/backend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ opendal = [
"tokio/rt-multi-thread",
"dep:typed-path",
]
rest = ["dep:reqwest", "dep:backoff"]
rest = ["dep:reqwest", "dep:backon"]
rclone = ["rest", "dep:rand", "dep:semver"]

[dependencies]
Expand Down Expand Up @@ -78,7 +78,7 @@ aho-corasick = { workspace = true }
walkdir = "2.5.0"

# rest backend
backoff = { version = "0.4.0", optional = true }
backon = { version = "1.2.0", optional = true }
reqwest = { version = "0.12.8", default-features = false, features = ["json", "rustls-tls-native-roots", "stream", "blocking"], optional = true }

# rclone backend
Expand Down
Loading

0 comments on commit 80892c5

Please sign in to comment.