diff --git a/Cargo.lock b/Cargo.lock index 4b058ef..b44d326 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -995,7 +995,7 @@ dependencies = [ [[package]] name = "pict-rs" -version = "0.3.0-alpha.13" +version = "0.3.0-alpha.15" dependencies = [ "actix-form-data", "actix-fs", diff --git a/Cargo.toml b/Cargo.toml index c8a2c7b..f782aa7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pict-rs" description = "A simple image hosting service" -version = "0.3.0-alpha.13" +version = "0.3.0-alpha.15" authors = ["asonix "] license = "AGPL-3.0" readme = "README.md" diff --git a/docker/prod/docker-compose.yml b/docker/prod/docker-compose.yml index 5d95a69..8c3315b 100644 --- a/docker/prod/docker-compose.yml +++ b/docker/prod/docker-compose.yml @@ -2,7 +2,7 @@ version: '3.3' services: pictrs: - image: asonix/pictrs:v0.3.0-alpha.14 + image: asonix/pictrs:v0.3.0-alpha.15 ports: - "127.0.0.1:8080:8080" restart: always diff --git a/src/exiv2.rs b/src/exiv2.rs index 60fdee7..59be3b7 100644 --- a/src/exiv2.rs +++ b/src/exiv2.rs @@ -14,7 +14,7 @@ static MAX_READS: once_cell::sync::OnceCell = once_cell::sync::OnceCell::new(); fn semaphore() -> &'static tokio::sync::Semaphore { - MAX_READS.get_or_init(|| tokio::sync::Semaphore::new(num_cpus::get() * 4)) + MAX_READS.get_or_init(|| tokio::sync::Semaphore::new(num_cpus::get() * 5)) } pub(crate) async fn clear_metadata

(file: P) -> Result<(), Exvi2Error> diff --git a/src/magick.rs b/src/magick.rs index e5c7d14..4f239c4 100644 --- a/src/magick.rs +++ b/src/magick.rs @@ -31,8 +31,7 @@ static MAX_CONVERSIONS: once_cell::sync::OnceCell = once_cell::sync::OnceCell::new(); fn semaphore() -> &'static tokio::sync::Semaphore { - MAX_CONVERSIONS - .get_or_init(|| tokio::sync::Semaphore::new(num_cpus::get().saturating_sub(1).max(1))) + MAX_CONVERSIONS.get_or_init(|| tokio::sync::Semaphore::new(num_cpus::get().max(1) * 5)) } pub(crate) async fn convert_file(