fix(api): increase watch-dir polling timeout from 10s to 30s

Transmission's watch dir scanner runs every ~10s, so a 10s deadline
could expire before the first scan completes. 30s gives 2-3 scan
cycles of headroom.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Justin Bollinger
2026-04-25 20:27:33 -04:00
co-authored by Claude Sonnet 4.6
parent 7e8641bc3b
commit 0d8089ea17
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -918,6 +918,9 @@ Interactive menu for downloading and managing wordlists from Weakpass.com via Bi
-------------------------------------------------------------------
### Version History
Version 2.9.4
- Fixed torrent add timeout: increased watch-dir polling window from 10s to 30s to give transmission's scanner (which runs every ~10s) enough time to pick up new .torrent files
Version 2.9.3
- Routed `.torrent` metadata files through a daemon-watched temp directory instead of the wordlist directory; actual wordlist content still lands in the configured wordlist directory
- Suppressed `transmission-daemon` stdout/stderr so daemon log messages no longer appear in the terminal
+1 -1
View File
@@ -347,7 +347,7 @@ class TransmissionSession:
def add(self, torrent_path: str) -> int:
before_ids = {e["id"] for e in self.list()}
shutil.copy2(torrent_path, self._watch_dir)
deadline = time.monotonic() + 10.0
deadline = time.monotonic() + 30.0
while time.monotonic() < deadline:
after_entries = self.list()
new_ids = [e["id"] for e in after_entries if e["id"] not in before_ids]