chore(apc): remove apc processing delay

This commit is contained in:
Steffen Jost 2023-09-06 14:00:07 +00:00
parent 875d79bf01
commit 7e756985ce

View File

@ -14,7 +14,7 @@ import Jobs.Queue
-- import Jobs.Handler.Intervals.Utils -- import Jobs.Handler.Intervals.Utils
import qualified Data.Text as Text import qualified Data.Text as Text
import UnliftIO.Concurrent (threadDelay) -- import UnliftIO.Concurrent (threadDelay)
-- import Database.Persist.Sql (deleteWhereCount) -- import Database.Persist.Sql (deleteWhereCount)
-- import Database.Esqueleto.Experimental ((:&)(..)) -- import Database.Esqueleto.Experimental ((:&)(..))
@ -25,15 +25,15 @@ import UnliftIO.Concurrent (threadDelay)
jobPrintAckChunkSize :: Int jobPrintAckChunkSize :: Int
jobPrintAckChunkSize = 32 jobPrintAckChunkSize = 64
-- needed, since JobPrintAck cannot requeue itself due to JobNoQueueSame (and having no parameters) -- needed, since JobPrintAck cannot requeue itself due to JobNoQueueSame (and having no parameters)
dispatchJobPrintAckAgain :: JobHandler UniWorX dispatchJobPrintAckAgain :: JobHandler UniWorX
dispatchJobPrintAckAgain = JobHandlerException act dispatchJobPrintAckAgain = JobHandlerException act
where where
act = do act = void $ queueJob JobPrintAck
liftIO $ threadDelay 3e6 -- wait 3s before continuing -- liftIO $ threadDelay 3e6 -- wait 3s before continuing UPDATE: no wait needed
void $ queueJob JobPrintAck
dispatchJobPrintAck :: JobHandler UniWorX dispatchJobPrintAck :: JobHandler UniWorX
dispatchJobPrintAck = JobHandlerException act dispatchJobPrintAck = JobHandlerException act