Skip to content

Commit

Permalink
Stop using subtractTime
Browse files Browse the repository at this point in the history
  • Loading branch information
ndmitchell committed Jul 15, 2016
1 parent 4b35f0a commit 0c1906a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Action/Server.hs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ replyServer log local store cdn htmlDir scope = \Input{..} -> case inputURL of
now <- getCurrentTime
summ <- logSummary log
let errs = sum [summaryErrors | Summary{..} <- summ, summaryDate >= pred (utctDay now)]
let alive = (now `subtractTime` spawned) / (24 * 60 * 60)
let alive = fromRational $ toRational $ (now `diffUTCTime` spawned) / (24 * 60 * 60)
let s = show errs ++ " errors since yesterday, running for " ++ showDP 2 alive ++ " days."
return $ if errs == 0 && alive < 1.5 then OutputString $ lstrPack $ "Happy. " ++ s else OutputFail $ lstrPack $ "Sad. " ++ s
["log"] -> do
Expand Down

0 comments on commit 0c1906a

Please sign in to comment.