mirror of
https://git.asonix.dog/asonix/relay.git
synced 2024-12-23 03:36:30 +00:00
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]]
|
||||
name = "ap-relay"
|
||||
version = "0.3.93"
|
||||
version = "0.3.94"
|
||||
dependencies = [
|
||||
"activitystreams",
|
||||
"activitystreams-ext",
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
rustPlatform.buildRustPackage {
|
||||
pname = "relay";
|
||||
version = "0.3.93";
|
||||
version = "0.3.94";
|
||||
src = ./.;
|
||||
cargoLock.lockFile = ./Cargo.lock;
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue