wait on child transfer processes, and invalidate cache
There's still a bug; if the child updates its transfer info file, then the data from it will superscede the TransferInfo, losing the info that we should wait on this child.
This commit is contained in:
parent
4a10795144
commit
62876502c5
7 changed files with 43 additions and 19 deletions
|
@ -44,12 +44,6 @@ shouldTransfer dstatus t = go =<< currentTransfers <$> getDaemonStatus dstatus
|
|||
not <$> inAnnex (transferKey t)
|
||||
| otherwise = return True
|
||||
|
||||
{- Waits for any of the transfers in the map to complete. -}
|
||||
waitTransfer :: IO ()
|
||||
waitTransfer = error "TODO"
|
||||
-- getProcessStatus True False pid
|
||||
-- runThreadState st invalidateCache
|
||||
|
||||
{- A transfer is run in a separate process, with a *copy* of the Annex
|
||||
- state. This is necessary to avoid blocking the rest of the assistant
|
||||
- on the transfer completing, and also to allow multiple transfers to run
|
||||
|
@ -81,4 +75,5 @@ runTransfer st dstatus t info
|
|||
M.insertWith' const t info
|
||||
{ startedTime = Just now
|
||||
, transferPid = Just pid
|
||||
, shouldWait = True
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue