implement annex.retry et al

Added annex.retry, annex.retry-delay, and per-remote versions to configure
transfer retries.

This commit was supported by the NSF-funded DataLad project.
This commit is contained in:
Joey Hess 2018-03-29 13:04:07 -04:00
parent 8a03f38931
commit 46d4316954
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
10 changed files with 67 additions and 21 deletions

View file

@ -467,7 +467,7 @@ copyFromRemote' forcersync r (State connpool _) key file dest meterupdate
Just (object, checksuccess) -> do
copier <- mkCopier hardlink params
runTransfer (Transfer Download u key)
file forwardRetry
file stdRetry
(\p -> copier object dest (combineMeterUpdate p meterupdate) checksuccess)
| Git.repoIsSsh (repo r) = if forcersync
then fallback meterupdate
@ -595,7 +595,7 @@ copyToRemote r (State connpool duc) key file meterupdate
ensureInitialized
copier <- mkCopier hardlink params
let verify = Annex.Content.RemoteVerify r
runTransfer (Transfer Download u key) file forwardRetry $ \p ->
runTransfer (Transfer Download u key) file stdRetry $ \p ->
let p' = combineMeterUpdate meterupdate p
in Annex.Content.saveState True `after`
Annex.Content.getViaTmp verify key