mirror of
https://github.com/NexVeridian/wikidata-to-surrealdb.git
synced 2025-09-02 18:09:15 +00:00
feat: swap to backon
This commit is contained in:
parent
091bb50a7e
commit
dbd039eebf
5 changed files with 110 additions and 131 deletions
9
src/utils/init_backoff.rs
Normal file
9
src/utils/init_backoff.rs
Normal file
|
@ -0,0 +1,9 @@
|
|||
use backon::ExponentialBuilder;
|
||||
use lazy_static::lazy_static;
|
||||
use tokio::time::Duration;
|
||||
|
||||
lazy_static! {
|
||||
pub static ref exponential: ExponentialBuilder = ExponentialBuilder::default()
|
||||
.with_max_times(30)
|
||||
.with_max_delay(Duration::from_secs(60));
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue