diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/src/Thermoprint/Server/Printer.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/server/src/Thermoprint/Server/Printer.hs b/server/src/Thermoprint/Server/Printer.hs index 55bfabc..67180c4 100644 --- a/server/src/Thermoprint/Server/Printer.hs +++ b/server/src/Thermoprint/Server/Printer.hs | |||
@@ -89,7 +89,9 @@ runPrinter Printer{..} = forever $ do | |||
89 | return jobId | 89 | return jobId |
90 | job <- runSqlPool (get jobId) =<< ask | 90 | job <- runSqlPool (get jobId) =<< ask |
91 | case job of | 91 | case job of |
92 | Nothing -> $(logWarn) "Nonexistent job id in printer queue" | 92 | Nothing -> do |
93 | atomically' $ modifyTVar' queue (\Queue{..} -> force $ Queue pending Nothing history) | ||
94 | $(logWarn) "Nonexistent job id in printer queue" | ||
93 | Just job -> do | 95 | Just job -> do |
94 | $(logInfo) . T.pack $ "Printing " ++ show (unSqlBackendKey . unJobKey $ jobId) | 96 | $(logInfo) . T.pack $ "Printing " ++ show (unSqlBackendKey . unJobKey $ jobId) |
95 | printReturn <- (unPM print) (jobContent job) -- We could, at this point, do some exception handling. It was decided that this would be undesirable, because we really don't have any idea what exceptions to catch | 97 | printReturn <- (unPM print) (jobContent job) -- We could, at this point, do some exception handling. It was decided that this would be undesirable, because we really don't have any idea what exceptions to catch |