@@ -537,20 +537,20 @@ jobPoller = do
537 -- If we can't run any jobs ATM, relax and wait for resources to free up
537 -- If we can't run any jobs ATM, relax and wait for resources to free up
538 delayAction
538 delayAction
539 True -> do
539 True -> do
540− nextAction <- mask_ $ do
541+ (mask_ $ do
541− log LevelDebug $ LogText $ toS $ "[" <> processName <> "] Polling the job queue.."
542+ log LevelDebug $ LogText $ toS $ "[" <> processName <> "] Polling the job queue.."
542− r <- liftIO $ jobPollingIO pollerDbConn processName tname lockTimeout
543+ r <- liftIO $ jobPollingIO pollerDbConn processName tname lockTimeout
543− case r of
544+ case r of
544− -- When we don't have any jobs to run, we can relax a bit...
545+ -- When we don't have any jobs to run, we can relax a bit...
545− [] -> pure delayAction
546+ [] -> pure delayAction
547− -- When we find a job to run, fork and try to find the next job without any delay...
548+ -- When we find a job to run, fork and try to find the next job without any delay...
548− [Only (jid :: JobId)] -> do
549+ [Only (jid :: JobId)] -> do
549− void $ async $ runJob jid
550+ void $ async $ runJob jid
550− pure noDelayAction
551+ pure noDelayAction
552− x -> error $ "WTF just happened? I was supposed to get only a single row, but got: " ++ (show x)
553+ x -> error $ "WTF just happened? I was supposed to get only a single row, but got: " ++ (show x))
555 delayAction = delaySeconds =<< getPollingInterval
555 delayAction = delaySeconds =<< getPollingInterval
556 noDelayAction = pure ()
556 noDelayAction = pure ()