Add missing await

This commit is contained in:
FliegendeWurst 2021-06-02 11:53:50 +02:00
parent e7354e0ad1
commit 1459ff5ae4
2 changed files with 1 additions and 9 deletions

View File

@ -188,7 +188,7 @@ fn process_gracefully(ilias: Arc<ILIAS>, 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);

View File

@ -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);
}
});