use watchFileSize in Remote.External.retrieveKeyFile
external: Monitor file size when getting content from external special
remotes and use that to update the progress meter, in case the external
special remote program does not report progress.
This relies on 703a70cafa
to prevent ever
running the meter backwards.
Sponsored-by: Dartmouth College's DANDI project
This commit is contained in:
parent
8da85fd3a3
commit
c02df79248
4 changed files with 47 additions and 1 deletions
|
@ -235,7 +235,7 @@ storeKeyM external = fileStorer $ \k f p ->
|
|||
|
||||
retrieveKeyFileM :: External -> Retriever
|
||||
retrieveKeyFileM external = fileRetriever $ \d k p ->
|
||||
either giveup return =<< go d k p
|
||||
either giveup return =<< watchFileSize d p (go d k)
|
||||
where
|
||||
go d k p = handleRequestKey external (\sk -> TRANSFER Download sk (fromRawFilePath d)) k (Just p) $ \resp ->
|
||||
case resp of
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue