mirror of
https://git.asonix.dog/asonix/pict-rs
synced 2024-11-10 06:25:00 +00:00
Remove serde-cbor, num_cpus
This commit is contained in:
parent
fd965bb1a5
commit
e0968dcce3
3 changed files with 5 additions and 21 deletions
18
Cargo.lock
generated
18
Cargo.lock
generated
|
@ -1034,12 +1034,6 @@ dependencies = [
|
||||||
"tracing",
|
"tracing",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "half"
|
|
||||||
version = "1.8.2"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "hashbrown"
|
name = "hashbrown"
|
||||||
version = "0.12.3"
|
version = "0.12.3"
|
||||||
|
@ -1833,7 +1827,6 @@ dependencies = [
|
||||||
"metrics",
|
"metrics",
|
||||||
"metrics-exporter-prometheus",
|
"metrics-exporter-prometheus",
|
||||||
"mime",
|
"mime",
|
||||||
"num_cpus",
|
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"opentelemetry",
|
"opentelemetry",
|
||||||
"opentelemetry-otlp",
|
"opentelemetry-otlp",
|
||||||
|
@ -1846,7 +1839,6 @@ dependencies = [
|
||||||
"rusty-s3",
|
"rusty-s3",
|
||||||
"serde",
|
"serde",
|
||||||
"serde-tuple-vec-map",
|
"serde-tuple-vec-map",
|
||||||
"serde_cbor",
|
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"serde_urlencoded",
|
"serde_urlencoded",
|
||||||
"sha2",
|
"sha2",
|
||||||
|
@ -2460,16 +2452,6 @@ dependencies = [
|
||||||
"serde",
|
"serde",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "serde_cbor"
|
|
||||||
version = "0.11.2"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5"
|
|
||||||
dependencies = [
|
|
||||||
"half",
|
|
||||||
"serde",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_derive"
|
name = "serde_derive"
|
||||||
version = "1.0.188"
|
version = "1.0.188"
|
||||||
|
|
|
@ -38,7 +38,6 @@ md-5 = "0.10.5"
|
||||||
metrics = "0.21.1"
|
metrics = "0.21.1"
|
||||||
metrics-exporter-prometheus = { version = "0.12.1", default-features = false, features = ["http-listener"] }
|
metrics-exporter-prometheus = { version = "0.12.1", default-features = false, features = ["http-listener"] }
|
||||||
mime = "0.3.1"
|
mime = "0.3.1"
|
||||||
num_cpus = "1.13"
|
|
||||||
once_cell = "1.4.0"
|
once_cell = "1.4.0"
|
||||||
opentelemetry = { version = "0.20", features = ["rt-tokio"] }
|
opentelemetry = { version = "0.20", features = ["rt-tokio"] }
|
||||||
opentelemetry-otlp = "0.13"
|
opentelemetry-otlp = "0.13"
|
||||||
|
@ -51,7 +50,6 @@ reqwest-tracing = { version = "0.4.5" }
|
||||||
rusty-s3 = "0.4.1"
|
rusty-s3 = "0.4.1"
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
serde-tuple-vec-map = "1.0.1"
|
serde-tuple-vec-map = "1.0.1"
|
||||||
serde_cbor = "0.11.2"
|
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
serde_urlencoded = "0.7.1"
|
serde_urlencoded = "0.7.1"
|
||||||
sha2 = "0.10.0"
|
sha2 = "0.10.0"
|
||||||
|
|
|
@ -89,7 +89,11 @@ const DAYS: u32 = 24 * HOURS;
|
||||||
const NOT_FOUND_KEY: &str = "404-alias";
|
const NOT_FOUND_KEY: &str = "404-alias";
|
||||||
|
|
||||||
static PROCESS_SEMAPHORE: Lazy<Semaphore> = Lazy::new(|| {
|
static PROCESS_SEMAPHORE: Lazy<Semaphore> = Lazy::new(|| {
|
||||||
let permits = num_cpus::get().saturating_sub(1).max(1);
|
let permits = std::thread::available_parallelism()
|
||||||
|
.map(usize::from)
|
||||||
|
.unwrap_or(1)
|
||||||
|
.saturating_sub(1)
|
||||||
|
.max(1);
|
||||||
|
|
||||||
crate::sync::bare_semaphore(permits)
|
crate::sync::bare_semaphore(permits)
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue