2
0
Fork 0
mirror of https://git.asonix.dog/asonix/pict-rs synced 2024-12-22 19:31:35 +00:00

Version v0.3.0-alpha.15

This commit is contained in:
Aode (lion) 2021-08-29 00:05:02 -05:00
parent 7c371c182a
commit 91207e1a6f
5 changed files with 5 additions and 6 deletions

2
Cargo.lock generated
View file

@ -995,7 +995,7 @@ dependencies = [
[[package]] [[package]]
name = "pict-rs" name = "pict-rs"
version = "0.3.0-alpha.13" version = "0.3.0-alpha.15"
dependencies = [ dependencies = [
"actix-form-data", "actix-form-data",
"actix-fs", "actix-fs",

View file

@ -1,7 +1,7 @@
[package] [package]
name = "pict-rs" name = "pict-rs"
description = "A simple image hosting service" description = "A simple image hosting service"
version = "0.3.0-alpha.13" version = "0.3.0-alpha.15"
authors = ["asonix <asonix@asonix.dog>"] authors = ["asonix <asonix@asonix.dog>"]
license = "AGPL-3.0" license = "AGPL-3.0"
readme = "README.md" readme = "README.md"

View file

@ -2,7 +2,7 @@ version: '3.3'
services: services:
pictrs: pictrs:
image: asonix/pictrs:v0.3.0-alpha.14 image: asonix/pictrs:v0.3.0-alpha.15
ports: ports:
- "127.0.0.1:8080:8080" - "127.0.0.1:8080:8080"
restart: always restart: always

View file

@ -14,7 +14,7 @@ static MAX_READS: once_cell::sync::OnceCell<tokio::sync::Semaphore> =
once_cell::sync::OnceCell::new(); once_cell::sync::OnceCell::new();
fn semaphore() -> &'static tokio::sync::Semaphore { 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<P>(file: P) -> Result<(), Exvi2Error> pub(crate) async fn clear_metadata<P>(file: P) -> Result<(), Exvi2Error>

View file

@ -31,8 +31,7 @@ static MAX_CONVERSIONS: once_cell::sync::OnceCell<tokio::sync::Semaphore> =
once_cell::sync::OnceCell::new(); once_cell::sync::OnceCell::new();
fn semaphore() -> &'static tokio::sync::Semaphore { fn semaphore() -> &'static tokio::sync::Semaphore {
MAX_CONVERSIONS MAX_CONVERSIONS.get_or_init(|| tokio::sync::Semaphore::new(num_cpus::get().max(1) * 5))
.get_or_init(|| tokio::sync::Semaphore::new(num_cpus::get().saturating_sub(1).max(1)))
} }
pub(crate) async fn convert_file<P1, P2>( pub(crate) async fn convert_file<P1, P2>(