Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
9 changes: 8 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 { 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());
Expand Down Expand Up @@ -237,6 +238,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<char> = key.trim().chars().collect();
Expand Down
Loading