forked from mirrors/relay
Simplify < RATIO, bump version
This commit is contained in:
parent
f3ff8ae5f7
commit
433c981a21
4 changed files with 4 additions and 9 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -391,7 +391,7 @@ checksum = "3b13c32d80ecc7ab747b80c3784bce54ee8a7a0cc4fbda9bf4cda2cf6fe90854"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ap-relay"
|
name = "ap-relay"
|
||||||
version = "0.3.93"
|
version = "0.3.94"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"activitystreams",
|
"activitystreams",
|
||||||
"activitystreams-ext",
|
"activitystreams-ext",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
name = "ap-relay"
|
name = "ap-relay"
|
||||||
description = "A simple activitypub relay"
|
description = "A simple activitypub relay"
|
||||||
version = "0.3.93"
|
version = "0.3.94"
|
||||||
authors = ["asonix <asonix@asonix.dog>"]
|
authors = ["asonix <asonix@asonix.dog>"]
|
||||||
license = "AGPL-3.0"
|
license = "AGPL-3.0"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
rustPlatform.buildRustPackage {
|
rustPlatform.buildRustPackage {
|
||||||
pname = "relay";
|
pname = "relay";
|
||||||
version = "0.3.93";
|
version = "0.3.94";
|
||||||
src = ./.;
|
src = ./.;
|
||||||
cargoLock.lockFile = ./Cargo.lock;
|
cargoLock.lockFile = ./Cargo.lock;
|
||||||
|
|
||||||
|
|
|
@ -263,12 +263,7 @@ async fn do_server_main(
|
||||||
|
|
||||||
let (signature_threads, verify_threads) = match config.signature_threads() {
|
let (signature_threads, verify_threads) = match config.signature_threads() {
|
||||||
0 | 1 => (1, 1),
|
0 | 1 => (1, 1),
|
||||||
n if n <= VERIFY_RATIO => {
|
n if n <= VERIFY_RATIO => (n, 1),
|
||||||
let verify_threads = (n / VERIFY_RATIO).max(1);
|
|
||||||
let signature_threads = n.saturating_sub(verify_threads).max(n);
|
|
||||||
|
|
||||||
(signature_threads, verify_threads)
|
|
||||||
}
|
|
||||||
n => {
|
n => {
|
||||||
let verify_threads = (n / VERIFY_RATIO).max(1);
|
let verify_threads = (n / VERIFY_RATIO).max(1);
|
||||||
let signature_threads = n.saturating_sub(verify_threads).max(VERIFY_RATIO);
|
let signature_threads = n.saturating_sub(verify_threads).max(VERIFY_RATIO);
|
||||||
|
|
Loading…
Reference in a new issue