move TransferrerPool from assistant

This old code will now be useful for git-annex beyond the assistant.

git-annex won't use the CheckTransferrer part, and won't run transferkeys
as a batch process, and will want withTransferrer to not shut down
transferkeys processes. Still, the rest of this is a good fit for what I
need now.

Also removed some dead code, and simplified a little bit.

This commit was sponsored by Mark Reidenbach on Patreon.
This commit is contained in:
Joey Hess 2020-12-07 12:50:48 -04:00
parent 438d5be1f7
commit 72e5764a87
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
6 changed files with 103 additions and 76 deletions

View file

@ -10,6 +10,7 @@
module Utility.Batch (
batch,
BatchCommandMaker,
nonBatchCommandMaker,
getBatchCommandMaker,
toBatchCommand,
batchCommand,
@ -50,6 +51,9 @@ batch a = a
- are available in the path. -}
type BatchCommandMaker = (String, [CommandParam]) -> (String, [CommandParam])
nonBatchCommandMaker :: BatchCommandMaker
nonBatchCommandMaker = id
getBatchCommandMaker :: IO BatchCommandMaker
getBatchCommandMaker = do
#ifndef mingw32_HOST_OS