Expand description
Torrent queue + auto-management (active/seeding caps, FIFO position). Queue position arithmetic for auto-managed torrents.
Structs§
- Queue
Candidate - Snapshot of a torrent for queue evaluation.
- Queue
Config - Named configuration for queue evaluation limits.
- Queue
Decision - Result of queue evaluation: which torrents to start and stop.
- Queue
Entry - Compact representation of a queued torrent for position operations.
Enums§
- Queue
Category - Classification of a torrent for queue evaluation.
Functions§
- apply_
preemption - Post-pass: for each category, if a queued torrent has strictly higher priority (lower position) than the lowest-priority active torrent, swap them. One swap per category per tick to prevent cascade instability.
- compute_
seed_ rank - Compute swarm demand rank for a seeding torrent.
- evaluate
- Evaluate the queue and decide which torrents to start/stop.
- move_
bottom - Move to last position (lowest priority). Returns changes.
- move_
down - Move one position down. Returns changes.
- move_
top - Move to position 0 (highest priority). Returns changes.
- move_up
- Move one position up (lower number = higher priority). Returns changes.
- remove_
position - Removes a position and shifts all positions above it down by 1.
Returns the list of (
info_hash,old_pos,new_pos) that changed. - set_
position - Moves a torrent to a new absolute position. Shifts others to maintain density.
Returns the list of (
info_hash,old_pos,new_pos) for all changed entries.