agourlay / dlm

Minimal HTTP download manager

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature Request] Auto Retry

chromer030 opened this issue · comments

The tool really needs a feature to automatically retry the failed download based on the specified time.

Proposed feature look likes this :

dlm -R retry time
dlm -R 10 'URL /--inputFile'

There is already a retry strategy implemented in dlm.

dlm/src/main.rs

Lines 99 to 101 in 22350c9

let retry_strategy = ExponentialBackoff::from_millis(1000)
.map(jitter) // add jitter to delays
.take(10); // limit to 10 retries

This is an exponential backoff with at most 10 retries.

Is this covering your needs?

Thank you very much , can we have an option for more than 10 please ?
for example dlm -r 20 ?

Fixed in d320648
Will be part of the next release.