diff options
author | 2013-11-23 17:21:04 -0400 | |
---|---|---|
committer | 2013-11-23 17:21:04 -0400 | |
commit | bd7b68de3d3b371fea3ff8dad1d4ec1dd9ce7e15 (patch) | |
tree | f1a725a61b19b0e7ec7b65e2ed22fd52430ac82b /Assistant/Threads/TransferWatcher.hs | |
parent | 2d7b692fb23b497110c179df15ad6b970171a652 (diff) |
queue and start download of git-annex from web, using git-annex, when upgrade is started
Diffstat (limited to 'Assistant/Threads/TransferWatcher.hs')
-rw-r--r-- | Assistant/Threads/TransferWatcher.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Assistant/Threads/TransferWatcher.hs b/Assistant/Threads/TransferWatcher.hs index fc09373e7..1c1e470f9 100644 --- a/Assistant/Threads/TransferWatcher.hs +++ b/Assistant/Threads/TransferWatcher.hs @@ -16,6 +16,7 @@ import Utility.DirWatcher.Types import qualified Remote import Control.Concurrent +import qualified Data.Map as M {- This thread watches for changes to the gitAnnexTransferDir, - and updates the DaemonStatus's map of ongoing transfers. -} @@ -89,6 +90,11 @@ onDel file = case parseTransferFile file of debug [ "transfer finishing:", show t] minfo <- removeTransfer t + -- Run transfer hook. + void $ maybe noop (\hook -> void $ forkIO $ hook t) + . M.lookup (transferKey t) + . transferHook <$> getDaemonStatus + finished <- asIO2 finishedTransfer void $ liftIO $ forkIO $ do {- XXX race workaround delay. The location |