fix: don't output empty lines without loglevel'
Some checks are pending
Conventional Commits / Conventional Commits (push) Waiting to run
Some checks are pending
Conventional Commits / Conventional Commits (push) Waiting to run
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
This commit is contained in:
parent
e56333a708
commit
c6fd77bc01
1 changed files with 2 additions and 4 deletions
|
@ -9,8 +9,7 @@ use async_recursion::async_recursion;
|
||||||
use reqwest::Client;
|
use reqwest::Client;
|
||||||
use tokio::time::sleep;
|
use tokio::time::sleep;
|
||||||
|
|
||||||
#[allow(unused)]
|
use log;
|
||||||
use log::{debug, error, info, trace, warn};
|
|
||||||
|
|
||||||
const MAX_SLIDE: u64 = 1000;
|
const MAX_SLIDE: u64 = 1000;
|
||||||
|
|
||||||
|
@ -29,8 +28,7 @@ pub async fn nar_exists(client: Client, domain: &str, hash: &str, slide: u64) ->
|
||||||
//
|
//
|
||||||
// Writng an actual sliding window seems kinda hard,
|
// Writng an actual sliding window seems kinda hard,
|
||||||
// so we do this instead.
|
// so we do this instead.
|
||||||
trace!("rate limited! {slide}");
|
log::trace!("rate limited! {slide}");
|
||||||
println!("");
|
|
||||||
sleep(Duration::from_millis(slide)).await;
|
sleep(Duration::from_millis(slide)).await;
|
||||||
nar_exists(client, domain, hash, std::cmp::min(slide * 2, MAX_SLIDE)).await
|
nar_exists(client, domain, hash, std::cmp::min(slide * 2, MAX_SLIDE)).await
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue