diff --git a/src/main.rs b/src/main.rs index 197e931..ca57d6b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -188,7 +188,7 @@ fn process_gracefully(ilias: Arc, path: PathBuf, obj: Object) -> impl Fut PROGRESS_BAR.inc_length(1); } async move { - let permit = queue::get_ticket(); + let permit = queue::get_ticket().await; let path_text = path.to_string_lossy().into_owned(); if let Err(e) = process(ilias, path, obj).await.context("failed to process URL") { error!("Syncing {}", path_text; e); diff --git a/src/queue.rs b/src/queue.rs index 50cd2ad..de9619a 100644 --- a/src/queue.rs +++ b/src/queue.rs @@ -29,14 +29,6 @@ pub fn set_download_rate(rate: usize) { let mut interval = time::interval(time::Duration::from_secs_f64(60.0 / rate as f64)); loop { interval.tick().await; - log!( - 0, - "interval ticked @ {}", - std::time::SystemTime::now() - .duration_since(std::time::SystemTime::UNIX_EPOCH) - .unwrap() - .as_secs() - ); REQUEST_TICKETS.add_permits(1); } });