Re-enable accumulating transfer failure log files for command-line actions
This was disabled in commit61ccf95004
, because only the assistant used them, and they were clutter. But, now --failed also uses them. Remove the failure log files after successful transfers. Should avoid most of the clutter problems. Commit61ccf95004
mentions a subtle behavior change, which has now been reverted: There is one behavior change from this. If glacier is being used, and a manual git annex get --from glacier fails because the file isn't available yet, the assistant will no longer later see that failed transfer file and retry the get.
This commit is contained in:
parent
1a0e2c9901
commit
f461bcae4b
4 changed files with 12 additions and 8 deletions
|
@ -94,8 +94,12 @@ runTransfer' ignorelock t file shouldretry transferobserver transferaction = do
|
||||||
return observeFailure
|
return observeFailure
|
||||||
else do
|
else do
|
||||||
v <- retry info metervar $ transferaction meter
|
v <- retry info metervar $ transferaction meter
|
||||||
|
let ok = observeBool v
|
||||||
liftIO $ cleanup tfile lck
|
liftIO $ cleanup tfile lck
|
||||||
transferobserver (observeBool v) t info
|
if ok
|
||||||
|
then removeFailedTransfer t
|
||||||
|
else recordFailedTransfer t info
|
||||||
|
transferobserver ok t info
|
||||||
return v
|
return v
|
||||||
where
|
where
|
||||||
#ifndef mingw32_HOST_OS
|
#ifndef mingw32_HOST_OS
|
||||||
|
|
|
@ -22,6 +22,9 @@ git-annex (6.20160726) UNRELEASED; urgency=medium
|
||||||
the content is present locally.
|
the content is present locally.
|
||||||
* get, move, copy, mirror: Added --failed switch which retries
|
* get, move, copy, mirror: Added --failed switch which retries
|
||||||
failed copies/moves.
|
failed copies/moves.
|
||||||
|
* Re-enable accumulating transfer failure log files for command-line
|
||||||
|
actions (disabled in 5.20150522), and remove the log files after
|
||||||
|
successful transfers.
|
||||||
|
|
||||||
-- Joey Hess <id@joeyh.name> Wed, 20 Jul 2016 12:03:15 -0400
|
-- Joey Hess <id@joeyh.name> Wed, 20 Jul 2016 12:03:15 -0400
|
||||||
|
|
||||||
|
|
|
@ -35,13 +35,13 @@ start = do
|
||||||
where
|
where
|
||||||
runner (TransferRequest direction remote key file)
|
runner (TransferRequest direction remote key file)
|
||||||
| direction == Upload = notifyTransfer direction file $
|
| direction == Upload = notifyTransfer direction file $
|
||||||
upload (Remote.uuid remote) key file forwardRetry observer $ \p -> do
|
upload (Remote.uuid remote) key file forwardRetry noObserver $ \p -> do
|
||||||
ok <- Remote.storeKey remote key file p
|
ok <- Remote.storeKey remote key file p
|
||||||
when ok $
|
when ok $
|
||||||
Remote.logStatus remote key InfoPresent
|
Remote.logStatus remote key InfoPresent
|
||||||
return ok
|
return ok
|
||||||
| otherwise = notifyTransfer direction file $
|
| otherwise = notifyTransfer direction file $
|
||||||
download (Remote.uuid remote) key file forwardRetry observer $ \p ->
|
download (Remote.uuid remote) key file forwardRetry noObserver $ \p ->
|
||||||
getViaTmp (RemoteVerify remote) key $ \t -> do
|
getViaTmp (RemoteVerify remote) key $ \t -> do
|
||||||
r <- Remote.retrieveKeyFile remote key file t p
|
r <- Remote.retrieveKeyFile remote key file t p
|
||||||
-- Make sure we get the current
|
-- Make sure we get the current
|
||||||
|
@ -49,9 +49,6 @@ start = do
|
||||||
-- not old cached data.
|
-- not old cached data.
|
||||||
Database.Keys.closeDb
|
Database.Keys.closeDb
|
||||||
return r
|
return r
|
||||||
|
|
||||||
observer False t tinfo = recordFailedTransfer t tinfo
|
|
||||||
observer True _ _ = noop
|
|
||||||
|
|
||||||
runRequests
|
runRequests
|
||||||
:: Handle
|
:: Handle
|
||||||
|
|
|
@ -3,6 +3,6 @@
|
||||||
subject="""comment 1"""
|
subject="""comment 1"""
|
||||||
date="2016-08-03T15:07:43Z"
|
date="2016-08-03T15:07:43Z"
|
||||||
content="""
|
content="""
|
||||||
Nice idea, and there's already a log of recent failed transfers that
|
Nice idea, and there's already an implementation of a log of recent failed
|
||||||
could be used.
|
transfers that the assistant uses, that can be reused for this.
|
||||||
"""]]
|
"""]]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue