1
1
mirror of https://github.com/aelve/guide.git synced 2024-12-28 08:03:07 +03:00

Fix warnings

This commit is contained in:
Vladislav Sabanov 2018-10-17 23:11:01 +05:00
parent 1b2b16f496
commit ec030f58b3
2 changed files with 7 additions and 7 deletions

View File

@ -371,7 +371,7 @@ adminMethods :: AdminM ctx ()
adminMethods = do
-- Accept an edit
Spock.post (adminRoute <//> "edit" <//> var <//> "accept") $ \n -> do
dbUpdate (RemovePendingEdit n)
_ <- dbUpdate (RemovePendingEdit n)
return ()
-- Undo an edit
Spock.post (adminRoute <//> "edit" <//> var <//> "undo") $ \n -> do
@ -380,7 +380,7 @@ adminMethods = do
case res of
Left err -> Spock.text (toText err)
Right () -> do invalidateCacheForEdit edit
dbUpdate (RemovePendingEdit n)
_ <- dbUpdate (RemovePendingEdit n)
Spock.text ""
-- Accept a range of edits
Spock.post (adminRoute <//> "edits" <//> var <//> var <//> "accept") $ \m n -> do
@ -394,7 +394,7 @@ adminMethods = do
case res of
Left err -> return (Just ((edit, details), Just err))
Right () -> do invalidateCacheForEdit edit
dbUpdate (RemovePendingEdit (editId details))
_ <- dbUpdate (RemovePendingEdit (editId details))
return Nothing
case failed of
[] -> Spock.text ""

View File

@ -186,7 +186,7 @@ mainWith config = do
hSetBuffering stdout NoBuffering
-- Create a checkpoint every six hours. Note: if nothing was changed, the
-- checkpoint won't be created, which saves us some space.
Slave.fork $ forever $ do
_ <- Slave.fork $ forever $ do
createCheckpoint' db
threadDelay (1000000 * 3600 * 6)
-- EKG metrics
@ -197,7 +197,7 @@ mainWith config = do
waiMetrics <- EKG.registerWaiMetrics (EKG.serverMetricStore ekg)
categoryGauge <- EKG.getGauge "db.categories" ekg
itemGauge <- EKG.getGauge "db.items" ekg
Slave.fork $ forever $ do
_ <- Slave.fork $ forever $ do
globalState <- Acid.query db GetGlobalState
let allCategories = globalState^.categories
let allItems = allCategories^..each.items.each
@ -205,7 +205,7 @@ mainWith config = do
EKG.Gauge.set itemGauge (fromIntegral (length allItems))
threadDelay (1000000 * 60)
-- Run the API
Slave.fork $ runApiServer db
_ <- Slave.fork $ runApiServer db
-- Run the server
let serverState = ServerState {
_config = config,
@ -418,7 +418,7 @@ authRedirect path action = do
startTemplateWatcher :: IO ()
startTemplateWatcher = void $
Slave.fork $ FSNotify.withManager $ \mgr -> do
FSNotify.watchTree mgr "templates/" (const True) $ \_ ->
_ <- FSNotify.watchTree mgr "templates/" (const True) $ \_ ->
emptyCache
forever $ threadDelay 1000000