diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-01-13 14:55:01 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-01-13 14:55:01 -0400 |
commit | 3b72782586f5f6872d00891f6b46f5a8cb654e7a (patch) | |
tree | eedcc18e399d06aa77c6637264d7bad3836fe94b /CmdLine/Action.hs | |
parent | c747c8e423afe272dcf045abf3f1e8c1f6985e5c (diff) |
immediate queue flushing when annex.queuesize=1
Previously, it only flushed when the queue got larger than 1.
Also, make the queue auto-flush when items are added, rather than needing
to be flushed as a separate step. This simplifies the code and make it more
efficient too, as it avoids needing to read the queue out of the state to
check if it should be flushed.
Diffstat (limited to 'CmdLine/Action.hs')
-rw-r--r-- | CmdLine/Action.hs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/CmdLine/Action.hs b/CmdLine/Action.hs index 2579196c9..03acb04d7 100644 --- a/CmdLine/Action.hs +++ b/CmdLine/Action.hs @@ -119,11 +119,8 @@ findFreeSlot = go [] {- Like commandAction, but without the concurrency. -} includeCommandAction :: CommandStart -> CommandCleanup -includeCommandAction a = account =<< tryIO go +includeCommandAction a = account =<< tryIO (callCommandAction a) where - go = do - Annex.Queue.flushWhenFull - callCommandAction a account (Right True) = return True account (Right False) = incerr account (Left err) = do |