Skip to content

Commit

Permalink
Fixed off by one error in worker
Browse files Browse the repository at this point in the history
  • Loading branch information
mpscholten committed Feb 21, 2024
1 parent 92af5ce commit 46f1540
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion IHP/Job/Queue.hs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ pollForJob tableName pollInterval onNewJob = do
-- For every job we send one signal to the job workers
-- This way we use full concurrency when we find multiple jobs
-- that haven't been picked up by the PGListener
forEach [0..count] \_ -> do
forEach [1..count] \_ -> do
Concurrent.putMVar onNewJob JobAvailable

-- Add up to 2 seconds of jitter to avoid all job queues polling at the same time
Expand Down

0 comments on commit 46f1540

Please sign in to comment.