queue size fix
Increase queue size for update-index actions, because otherwise they'll never be flushed.
This commit is contained in:
parent
e5f855b7f8
commit
c5707c84d3
2 changed files with 8 additions and 7 deletions
|
@ -9,7 +9,8 @@ module Annex.Queue (
|
||||||
addCommand,
|
addCommand,
|
||||||
addUpdateIndex,
|
addUpdateIndex,
|
||||||
flush,
|
flush,
|
||||||
flushWhenFull
|
flushWhenFull,
|
||||||
|
size
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Common.Annex
|
import Common.Annex
|
||||||
|
@ -45,6 +46,10 @@ flush = do
|
||||||
q' <- inRepo $ Git.Queue.flush q
|
q' <- inRepo $ Git.Queue.flush q
|
||||||
store q'
|
store q'
|
||||||
|
|
||||||
|
{- Gets the size of the queue. -}
|
||||||
|
size :: Annex Int
|
||||||
|
size = Git.Queue.size <$> get
|
||||||
|
|
||||||
get :: Annex Git.Queue.Queue
|
get :: Annex Git.Queue.Queue
|
||||||
get = maybe new return =<< getState repoqueue
|
get = maybe new return =<< getState repoqueue
|
||||||
|
|
||||||
|
|
|
@ -98,14 +98,10 @@ addCommand subcommand params files q repo =
|
||||||
different (CommandAction { getSubcommand = s }) = s /= subcommand
|
different (CommandAction { getSubcommand = s }) = s /= subcommand
|
||||||
different _ = True
|
different _ = True
|
||||||
|
|
||||||
{- Adds an update-index streamer to the queue.
|
{- Adds an update-index streamer to the queue. -}
|
||||||
-
|
|
||||||
- Note that this does not increase the queue size, because data is
|
|
||||||
- streamed into update-index, so command-line length limits are not
|
|
||||||
- involved. -}
|
|
||||||
addUpdateIndex :: Git.UpdateIndex.Streamer -> Queue -> Repo -> IO Queue
|
addUpdateIndex :: Git.UpdateIndex.Streamer -> Queue -> Repo -> IO Queue
|
||||||
addUpdateIndex streamer q repo =
|
addUpdateIndex streamer q repo =
|
||||||
updateQueue action different 0 q repo
|
updateQueue action different 1 q repo
|
||||||
where
|
where
|
||||||
key = actionKey action
|
key = actionKey action
|
||||||
-- streamer is added to the end of the list, since
|
-- streamer is added to the end of the list, since
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue