Simplify < RATIO, bump version
All checks were successful
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing

This commit is contained in:
asonix 2023-07-27 11:10:29 -05:00
parent f3ff8ae5f7
commit 433c981a21
4 changed files with 4 additions and 9 deletions

2
Cargo.lock generated
View file

@ -391,7 +391,7 @@ checksum = "3b13c32d80ecc7ab747b80c3784bce54ee8a7a0cc4fbda9bf4cda2cf6fe90854"
[[package]]
name = "ap-relay"
version = "0.3.93"
version = "0.3.94"
dependencies = [
"activitystreams",
"activitystreams-ext",

View file

@ -1,7 +1,7 @@
[package]
name = "ap-relay"
description = "A simple activitypub relay"
version = "0.3.93"
version = "0.3.94"
authors = ["asonix <asonix@asonix.dog>"]
license = "AGPL-3.0"
readme = "README.md"

View file

@ -6,7 +6,7 @@
rustPlatform.buildRustPackage {
pname = "relay";
version = "0.3.93";
version = "0.3.94";
src = ./.;
cargoLock.lockFile = ./Cargo.lock;

View file

@ -263,12 +263,7 @@ async fn do_server_main(
let (signature_threads, verify_threads) = match config.signature_threads() {
0 | 1 => (1, 1),
n if n <= VERIFY_RATIO => {
let verify_threads = (n / VERIFY_RATIO).max(1);
let signature_threads = n.saturating_sub(verify_threads).max(n);
(signature_threads, verify_threads)
}
n if n <= VERIFY_RATIO => (n, 1),
n => {
let verify_threads = (n / VERIFY_RATIO).max(1);
let signature_threads = n.saturating_sub(verify_threads).max(VERIFY_RATIO);