From 38d0f92ee9f9a5addeae50d28556d40cd39b8c0c Mon Sep 17 00:00:00 2001 From: Luke Berndt Date: Thu, 5 Nov 2026 22:15:24 -0500 Subject: [PATCH 1/2] 0.1.8: four uploads at once for each server, up from two Every system sending to the same server shares one lane of the queue, and the SDK's default of 2 workers leaves each upload ~1.5 s at 4800 calls/hr before calls start to wait and reach Broadcastify Calls late. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 6 ++++++ Cargo.lock | 2 +- Cargo.toml | 2 +- src/main.rs | 8 +++++++- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 12d4ddb..c50bccf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [0.1.8] + +- Four uploads at once for each server, up from two. Every system sending to the same server shares + them, and at a few thousand calls an hour two couldn't keep up, so calls waited and reached + Broadcastify late. + ## [0.1.7] - **Talkgroups** is a menu on each system's card: **Every talkgroup**, **Only some** (with diff --git a/Cargo.lock b/Cargo.lock index e728aba..68af34d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -16,7 +16,7 @@ checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5" [[package]] name = "broadcastify" -version = "0.1.7" +version = "0.1.8" dependencies = [ "schemars", "serde", diff --git a/Cargo.toml b/Cargo.toml index e0d4386..ac1e908 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "broadcastify" -version = "0.1.7" +version = "0.1.8" edition = "2024" description = "Uploads recorded calls to Broadcastify Calls." license = "GPL-3.0-or-later" diff --git a/src/main.rs b/src/main.rs index 6226e12..372c9b6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -187,7 +187,7 @@ impl Plugin for Broadcastify { // Each server is a lane of the queue: one that's down holds up no other. let targets = Arc::new(targets); let lanes = targets.clone(); - let opts = QueueOptions { noun: "upload", endpoint: Some("Broadcastify Calls".into()), ..QueueOptions::saved_in(&setup.data_dir) }; + let opts = QueueOptions { threads: UPLOAD_THREADS, noun: "upload", endpoint: Some("Broadcastify Calls".into()), ..QueueOptions::saved_in(&setup.data_dir) }; let lane = move |call: &ConcludedCall| lanes.get(&call.call.short_name).map(|t| t.lane.clone()).unwrap_or_default(); // Systems whose settings Broadcastify turned down, said once each. let refused = Mutex::new(HashSet::new()); @@ -237,6 +237,12 @@ impl Plugin for Broadcastify { } } +/// Uploads worked on at once, for each server. Every system sending to the +/// same server shares them, and each upload is two round trips (the details, +/// then the audio): at 4800 calls an hour, the SDK's 2 would leave each +/// upload 1.5 s before calls start to wait. +const UPLOAD_THREADS: usize = 4; + /// The key's last two characters, to tell keys apart in the log. fn last2(key: &str) -> String { let k: Vec = key.trim().chars().collect(); From a4bf1649b116497a964d436cee07eccb10fa4d31 Mon Sep 17 00:00:00 2001 From: Luke Berndt Date: Fri, 6 Nov 2026 07:28:43 -0500 Subject: [PATCH 2/2] cargo fmt Co-Authored-By: Claude Opus 5.5 --- src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 372c9b6..b980935 100644 --- a/src/main.rs +++ b/src/main.rs @@ -187,7 +187,8 @@ impl Plugin for Broadcastify { // Each server is a lane of the queue: one that's down holds up no other. let targets = Arc::new(targets); let lanes = targets.clone(); - let opts = QueueOptions { threads: UPLOAD_THREADS, noun: "upload", endpoint: Some("Broadcastify Calls".into()), ..QueueOptions::saved_in(&setup.data_dir) }; + let opts = + QueueOptions { threads: UPLOAD_THREADS, noun: "upload", endpoint: Some("Broadcastify Calls".into()), ..QueueOptions::saved_in(&setup.data_dir) }; let lane = move |call: &ConcludedCall| lanes.get(&call.call.short_name).map(|t| t.lane.clone()).unwrap_or_default(); // Systems whose settings Broadcastify turned down, said once each. let refused = Mutex::new(HashSet::new());