fix: don't output empty lines without loglevel'
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:
Christina Sørensen 2024-09-05 07:48:21 +02:00
parent e56333a708
commit c6fd77bc01
Signed by: cafkafk
GPG key ID: 26C542FD97F965CE

View file

@ -9,8 +9,7 @@ use async_recursion::async_recursion;
use reqwest::Client;
use tokio::time::sleep;
#[allow(unused)]
use log::{debug, error, info, trace, warn};
use log;
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,
// so we do this instead.
trace!("rate limited! {slide}");
println!("");
log::trace!("rate limited! {slide}");
sleep(Duration::from_millis(slide)).await;
nar_exists(client, domain, hash, std::cmp::min(slide * 2, MAX_SLIDE)).await
}