fix problem with last commit and assistant
liftAnnex blocks all others calls, so avoid using it with a long-duration call to readResponse.
This commit is contained in:
parent
cad147cbbf
commit
7a9b618d5d
4 changed files with 17 additions and 11 deletions
|
@ -155,7 +155,7 @@ genTransfer t info = case transferRemote info of
|
|||
- usual cleanup. However, first check if something else is
|
||||
- running the transfer, to avoid removing active transfers.
|
||||
-}
|
||||
go remote transferrer = ifM (liftAnnex $ performTransfer transferrer t info)
|
||||
go remote transferrer = ifM (performTransfer transferrer t info)
|
||||
( do
|
||||
case associatedFile info of
|
||||
AssociatedFile Nothing -> noop
|
||||
|
|
|
@ -55,10 +55,17 @@ checkTransferrerPoolItem program batchmaker i = case i of
|
|||
|
||||
{- Requests that a Transferrer perform a Transfer, and waits for it to
|
||||
- finish. -}
|
||||
performTransfer :: Transferrer -> Transfer -> TransferInfo -> Annex Bool
|
||||
performTransfer :: Transferrer -> Transfer -> TransferInfo -> Assistant Bool
|
||||
performTransfer transferrer t info = catchBoolIO $ do
|
||||
(liftIO $ T.sendRequest t info (transferrerWrite transferrer))
|
||||
T.readResponse (transferrerRead transferrer)
|
||||
readresponse
|
||||
where
|
||||
readresponse =
|
||||
liftIO (T.readResponse (transferrerRead transferrer)) >>= \case
|
||||
Right r -> return r
|
||||
Left so -> do
|
||||
liftAnnex $ emitSerializedOutput so
|
||||
readresponse
|
||||
|
||||
{- Starts a new git-annex transferkeys process, setting up handles
|
||||
- that will be used to communicate with it. -}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue