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:
parent
7c371c182a
commit
91207e1a6f
5 changed files with 5 additions and 6 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -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",
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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>(
|
||||||
|
|
Loading…
Reference in a new issue