ytptube/app/library/downloads
Jesse Bate 687c82cb32 feat: add YTP_MAX_HISTORY to cap history and prevent unbounded DB growth
Long-running instances accumulate history indefinitely. As the history
table grows, SQLite COUNT(*), paginated SELECT, and index scans degrade.

YTP_MAX_HISTORY (default: 0 = unlimited) caps the number of completed
download records kept. Enforcement is a hook in DataStore.put(): on
each insertion, the oldest excess entries are immediately evicted from
the in-memory OrderedDict and their deletes are enqueued to SQLite.
DataStore.load() also trims on startup in case the limit was lowered
between restarts. No background tasks, no DB reads needed for the check.
2026-06-10 20:29:18 +09:30
..
__init__.py Refactor: download module into testable chunks 2026-01-13 20:05:01 +03:00
core.py refactor: use single logger namespace 2026-05-28 19:07:11 +03:00
hooks.py refactor: add more context to the actual log message. 2026-05-28 17:56:28 +03:00
item_adder.py refactor: use single logger namespace 2026-05-28 19:07:11 +03:00
monitors.py refactor: use single logger namespace 2026-05-28 19:07:11 +03:00
playlist_processor.py refactor: use single logger namespace 2026-05-28 19:07:11 +03:00
pool_manager.py refactor: use single logger namespace 2026-05-28 19:07:11 +03:00
process_manager.py refactor: update log mesages to take advantage of JSONL 2026-05-27 23:53:42 +03:00
queue_manager.py feat: add YTP_MAX_HISTORY to cap history and prevent unbounded DB growth 2026-06-10 20:29:18 +09:30
status_tracker.py perf: throttle item_updated WebSocket events to 500ms intervals 2026-06-10 19:32:31 +09:30
temp_manager.py refactor: add more context to the actual log message. 2026-05-28 17:56:28 +03:00
types.py Refactor: download module into testable chunks 2026-01-13 20:05:01 +03:00
utils.py refactor: update log mesages to take advantage of JSONL 2026-05-27 23:53:42 +03:00
video_processor.py refactor: use single logger namespace 2026-05-28 19:07:11 +03:00