make the assistant retry failed transfers
When a transfer fails, the progress info can be used to intelligently retry it. If the transfer managed to make some progress, but did not fully complete, then there's a good chance that a retry will finish it (or at least make more progress).
This commit is contained in:
parent
d4055b3dd2
commit
df07ccf404
6 changed files with 37 additions and 17 deletions
|
@ -24,7 +24,7 @@ seek = [withKeys start]
|
|||
|
||||
start :: Key -> CommandStart
|
||||
start key = ifM (inAnnex key)
|
||||
( fieldTransfer Upload key $ \p -> do
|
||||
( fieldTransfer Upload key $ \_p -> do
|
||||
file <- inRepo $ gitAnnexLocation key
|
||||
liftIO $ rsyncServerSend file
|
||||
, do
|
||||
|
@ -36,7 +36,7 @@ fieldTransfer :: Direction -> Key -> (MeterUpdate -> Annex Bool) -> CommandStart
|
|||
fieldTransfer direction key a = do
|
||||
afile <- Fields.getField Fields.associatedFile
|
||||
ok <- maybe (a $ const noop)
|
||||
(\u -> runTransfer (Transfer direction (toUUID u) key) afile a)
|
||||
(\u -> runTransfer (Transfer direction (toUUID u) key) afile noRetry a)
|
||||
=<< Fields.getField Fields.remoteUUID
|
||||
if ok
|
||||
then liftIO exitSuccess
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue