Skip to content

Commit

Permalink
update concurrency limit
Browse files Browse the repository at this point in the history
  • Loading branch information
Geometrically committed Jun 25, 2024
1 parent ed16d2d commit c4b0927
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ RUST_LOG=warn,daedalus_client=trace

BASE_URL=http://localhost:9000/meta

CONCURRENCY_LIMIT=10

S3_ACCESS_TOKEN=none
S3_SECRET=none
S3_URL=http://localhost:9000
Expand Down
7 changes: 6 additions & 1 deletion daedalus_client/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ async fn main() -> Result<()> {
return Ok(());
}

let semaphore = Arc::new(Semaphore::new(1));
let semaphore = Arc::new(Semaphore::new(
dotenvy::var("CONCURRENCY_LIMIT")
.ok()
.and_then(|x| x.parse().ok())
.unwrap_or(10),
));

// path, upload file
let upload_files: DashMap<String, UploadFile> = DashMap::new();
Expand Down

0 comments on commit c4b0927

Please sign in to comment.