mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-11-24 18:05:07 +00:00
refactor(api): remove dead code paths in serve/remote layer
Delete code paths that never executed in the serve/API/remote stack: - BridgeCancelledError: raised but never caught; replace raises with RuntimeError and drop the class. - InputBridge.error setter and _error field: written at the handler layer, never read (session.auth_error is the surfaced channel). - cancel_event param and _check_cancel inner fn on _perform_download: the only caller always passed None (the live job.cancel_event is untouched). - result_with_progress monkeypatch: its status pings were redundant with the file-polled progress_sink, which is now the sole path. - session param on _resolve_manifest_data: unused in the body. Reconcile SessionStore's hardcoded 600s auth-state TTL into a shared AUTH_INPUT_TIMEOUT constant referenced by both the InputBridge input timeout and the store, removing the magic number without changing the longer grace window. Update input_bridge/session_store tests for the new channels and add an assertion that auth-state entries expire at the single rule.
This commit is contained in:
@@ -60,7 +60,7 @@ def main(argv: list[str]) -> int:
|
||||
log.error(f"Failed to write progress update: {e}")
|
||||
|
||||
output_files = _perform_download(
|
||||
job_id, service, title_id, params, cancel_event=None, progress_callback=progress_callback
|
||||
job_id, service, title_id, params, progress_callback=progress_callback
|
||||
)
|
||||
|
||||
result = {"status": "success", "output_files": output_files}
|
||||
|
||||
Reference in New Issue
Block a user