diff options
Diffstat (limited to 'server/src/Thermoprint/Server.hs')
-rw-r--r-- | server/src/Thermoprint/Server.hs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/server/src/Thermoprint/Server.hs b/server/src/Thermoprint/Server.hs index cd3a4ed..49f3e82 100644 --- a/server/src/Thermoprint/Server.hs +++ b/server/src/Thermoprint/Server.hs | |||
@@ -14,8 +14,8 @@ module Thermoprint.Server | |||
14 | , module Data.Default.Class | 14 | , module Data.Default.Class |
15 | , module Servant.Server.Internal.Enter | 15 | , module Servant.Server.Internal.Enter |
16 | , module Thermoprint.Server.Printer | 16 | , module Thermoprint.Server.Printer |
17 | , module Thermoprint.Server.Queue | ||
18 | , module Thermoprint.Server.QMConfig | 17 | , module Thermoprint.Server.QMConfig |
18 | , Queue(..), QueueEntry(..) | ||
19 | ) where | 19 | ) where |
20 | 20 | ||
21 | import Data.Default.Class | 21 | import Data.Default.Class |
@@ -78,7 +78,7 @@ import Thermoprint.Server.Push | |||
78 | 78 | ||
79 | import Thermoprint.Server.Database | 79 | import Thermoprint.Server.Database |
80 | import Thermoprint.Server.Printer | 80 | import Thermoprint.Server.Printer |
81 | import Thermoprint.Server.Queue | 81 | import Thermoprint.Server.Queue hiding (intersection, idQM, union, nullQM, runQM) |
82 | import Thermoprint.Server.QMConfig | 82 | import Thermoprint.Server.QMConfig |
83 | import qualified Thermoprint.Server.API as API (thermoprintServer) | 83 | import qualified Thermoprint.Server.API as API (thermoprintServer) |
84 | import Thermoprint.Server.API hiding (thermoprintServer) | 84 | import Thermoprint.Server.API hiding (thermoprintServer) |
@@ -140,8 +140,7 @@ thermoprintServer dyre io = Dyre.wrapMain $ Dyre.defaultParams | |||
140 | gcChan <- liftIO newTChanIO | 140 | gcChan <- liftIO newTChanIO |
141 | fork tMgr $ jobGC gcChan | 141 | fork tMgr $ jobGC gcChan |
142 | let | 142 | let |
143 | runQM' (queueManagers -> QMConfig qm nat) printer = unNat nat $ runQM gcChan qm printer | 143 | runQM' = runQM gcChan . queueManagers |
144 | runQM' (queueManagers -> QMConfig' qm) printer = hoist liftIO $ runQM gcChan qm printer | ||
145 | mapM_ (fork tMgr . uncurry runQM') $ Map.toList printers | 144 | mapM_ (fork tMgr . uncurry runQM') $ Map.toList printers |
146 | nChan <- liftIO $ newBroadcastTChanIO | 145 | nChan <- liftIO $ newBroadcastTChanIO |
147 | let | 146 | let |