disentangle concurrency and message type
This makes -Jn work with --json and --quiet, where before setting -Jn disabled those options. Concurrent json output is currently a mess though since threads output chunks over top of one-another.
This commit is contained in:
parent
8e9267a1ed
commit
8ef494a833
12 changed files with 96 additions and 84 deletions
|
@ -21,6 +21,7 @@ import Types.Messages
|
|||
import Types.Command
|
||||
import Types.DeferredParse
|
||||
import Types.DesktopNotify
|
||||
import Types.Concurrency
|
||||
import qualified Annex
|
||||
import qualified Remote
|
||||
import qualified Limit
|
||||
|
@ -302,7 +303,7 @@ jobsOption = globalSetter set $
|
|||
)
|
||||
where
|
||||
set n = do
|
||||
Annex.changeState $ \s -> s { Annex.concurrentjobs = Just n }
|
||||
Annex.changeState $ \s -> s { Annex.concurrency = Concurrent n }
|
||||
c <- liftIO getNumCapabilities
|
||||
when (n > c) $
|
||||
liftIO $ setNumCapabilities n
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue