diff options
Diffstat (limited to 'server/src/Thermoprint/Server.hs')
-rw-r--r-- | server/src/Thermoprint/Server.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/server/src/Thermoprint/Server.hs b/server/src/Thermoprint/Server.hs index 4559414..df2d8e9 100644 --- a/server/src/Thermoprint/Server.hs +++ b/server/src/Thermoprint/Server.hs | |||
@@ -132,7 +132,9 @@ thermoprintServer dyre io = Dyre.wrapMain $ Dyre.defaultParams | |||
132 | maybe (return ()) ($(logErrorS) "Dyre" . T.pack) dyreError | 132 | maybe (return ()) ($(logErrorS) "Dyre" . T.pack) dyreError |
133 | mapM_ ($(logWarnS) "DB") =<< runSqlPool (runMigrationSilent migrateAll) =<< ask | 133 | mapM_ ($(logWarnS) "DB") =<< runSqlPool (runMigrationSilent migrateAll) =<< ask |
134 | forM_ printers $ fork tMgr . runPrinter | 134 | forM_ printers $ fork tMgr . runPrinter |
135 | gcChan <- liftIO newTChanIO | ||
136 | fork tMgr $ jobGC gcChan | ||
135 | let | 137 | let |
136 | runQM' (queueManagers -> QMConfig qm nat) printer = unNat nat $ runQM qm printer | 138 | runQM' (queueManagers -> QMConfig qm nat) printer = unNat nat $ runQM gcChan qm printer |
137 | mapM_ (fork tMgr . uncurry runQM') $ Map.toList printers | 139 | mapM_ (fork tMgr . uncurry runQM') $ Map.toList printers |
138 | liftIO . Warp.runSettings warpSettings . serve thermoprintAPI . flip enter API.thermoprintServer =<< handlerNat printers | 140 | liftIO . Warp.runSettings warpSettings . serve thermoprintAPI . flip enter API.thermoprintServer =<< handlerNat printers |