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.
This commit is contained in:
parent
1d5b70db9c
commit
b52cf5697b
5 changed files with 21 additions and 23 deletions
|
@ -137,7 +137,7 @@ merge origq newq = origq
|
|||
|
||||
{- Is a queue large enough that it should be flushed? -}
|
||||
full :: Queue -> Bool
|
||||
full (Queue cur lim _) = cur > lim
|
||||
full (Queue cur lim _) = cur >= lim
|
||||
|
||||
{- Runs a queue on a git repository. -}
|
||||
flush :: Queue -> Repo -> IO Queue
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue