diff options
-rw-r--r-- | server/src/Thermoprint/Server/Queue.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/server/src/Thermoprint/Server/Queue.hs b/server/src/Thermoprint/Server/Queue.hs index cebf759..89a86bc 100644 --- a/server/src/Thermoprint/Server/Queue.hs +++ b/server/src/Thermoprint/Server/Queue.hs | |||
@@ -139,7 +139,7 @@ runQM :: ( HasQueue q | |||
139 | -- /TODO/: Garbage collect deleted jobs -- maybe switch to 'Set QueueItem' in 'QueueManager' | 139 | -- /TODO/: Garbage collect deleted jobs -- maybe switch to 'Set QueueItem' in 'QueueManager' |
140 | runQM qm (extractQueue -> q) = sleep =<< qm' | 140 | runQM qm (extractQueue -> q) = sleep =<< qm' |
141 | where | 141 | where |
142 | qm' = hoist atomically $ (\(a, s) -> lift (writeTVar q $!! s) >> return a) =<< runStateT (getComposeT qm) =<< lift (readTVar q) | 142 | qm' = hoist atomically $ (\(a, s) -> a <$ lift (writeTVar q $!! s)) =<< runStateT (getComposeT qm) =<< lift (readTVar q) |
143 | sleep (abs -> delay) | 143 | sleep (abs -> delay) |
144 | | (Finite d) <- delay = liftIO (threadDelay $ fromEnum d) >> runQM qm q | 144 | | (Finite d) <- delay = liftIO (threadDelay $ fromEnum d) >> runQM qm q |
145 | | otherwise = return () | 145 | | otherwise = return () |