try to fix fd issues
This commit is contained in:
parent
0fae7ac3b0
commit
0fedae9334
3 changed files with 40 additions and 17 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue