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