diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2016-02-18 18:35:26 +0000 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2016-02-18 18:35:26 +0000 |
commit | 605cbff0026013c1faf341b127868bffc5ec1cb9 (patch) | |
tree | 4847296ede55eed50cd3f55c48e3a25e189a9646 /server | |
parent | 62d5d1301163a4d04951b1185dd96fb0ab1fdf5b (diff) | |
download | thermoprint-605cbff0026013c1faf341b127868bffc5ec1cb9.tar thermoprint-605cbff0026013c1faf341b127868bffc5ec1cb9.tar.gz thermoprint-605cbff0026013c1faf341b127868bffc5ec1cb9.tar.bz2 thermoprint-605cbff0026013c1faf341b127868bffc5ec1cb9.tar.xz thermoprint-605cbff0026013c1faf341b127868bffc5ec1cb9.zip |
minor code cleanup
Diffstat (limited to 'server')
-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 () |