summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-12-01 14:56:37 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-12-01 14:56:37 -0400
commitc6c04581a8567e6b87c8df754947ac8779845507 (patch)
treee67d43908fc7000699abffc75564a2990ecebe09
parent3ac91582743a295c23240b7dabe0cf605a38c4b1 (diff)
assistant: Run transferkeys as batch jobs.
-rw-r--r--Assistant/TransferrerPool.hs5
-rw-r--r--debian/changelog1
2 files changed, 5 insertions, 1 deletions
diff --git a/Assistant/TransferrerPool.hs b/Assistant/TransferrerPool.hs
index bb4648731..79b609a1d 100644
--- a/Assistant/TransferrerPool.hs
+++ b/Assistant/TransferrerPool.hs
@@ -12,6 +12,7 @@ module Assistant.TransferrerPool where
import Assistant.Common
import Assistant.Types.TransferrerPool
import Logs.Transfer
+import Utility.Batch
#ifndef mingw32_HOST_OS
import qualified Command.TransferKeys as T
@@ -63,9 +64,11 @@ mkTransferrer program = do
, Param "--readfd", Param $ show tread
, Param "--writefd", Param $ show twrite
]
+ {- It runs as a batch job. -}
+ (program', params') <- toBatchCommand (program, params)
{- It's put into its own group so that the whole group can be
- killed to stop a transfer. -}
- (_, _, _, pid) <- createProcess (proc program $ toCommand params)
+ (_, _, _, pid) <- createProcess (proc program' $ toCommand params')
{ create_group = True }
closeFd twrite
closeFd tread
diff --git a/debian/changelog b/debian/changelog
index 567ea8bbf..a9fcc1857 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,7 @@ git-annex (5.20131131) UNRELEASED; urgency=low
it will read the full contents of files in the tree.
* assistant: Batch jobs are now run with ionice and nocache, when
those commands are available.
+ * assistant: Run transferkeys as batch jobs.
-- Joey Hess <joeyh@debian.org> Sun, 01 Dec 2013 13:57:58 -0400