try to fix fd issues

This commit is contained in:
cy 2025-04-26 18:21:49 -04:00
parent 0fae7ac3b0
commit 0fedae9334
Signed by: cy
SSH key fingerprint: SHA256:o/geVWV4om1QhUSkKvDQeW/eAihwnjyXkqMwrVdbuts
3 changed files with 40 additions and 17 deletions

View file

@ -18,7 +18,7 @@ use url::Url;
use crate::{PushArgs, path_info::PathInfo, store::Store, uploader::Uploader};
const UPLOAD_CONCURRENCY: usize = 32;
const UPLOAD_CONCURRENCY: usize = 5;
pub struct Push {
upstream_caches: Vec<Url>,
@ -159,6 +159,7 @@ impl Push {
loop {
let permits = permits.clone();
debug!("upload permits available: {}", permits.available_permits());
let permit = permits.acquire_owned().await.unwrap();
if let Some(path_to_upload) = rx.recv().await {