aboutsummaryrefslogtreecommitdiff
path: root/lib/Server.hs
diff options
context:
space:
mode:
authorstuebinm2022-09-14 21:49:45 +0200
committerstuebinm2022-09-14 21:49:45 +0200
commit34f22db88c12f4f4298e5cd5c53f009c44ec568f (patch)
tree6e8937b64b0525a3773127853aa4432660de6617 /lib/Server.hs
parent46a24c8a90d4e6e794a2c6ed79da94e02e2c7eab (diff)
remove some extrapolation bugs
Diffstat (limited to 'lib/Server.hs')
-rw-r--r--lib/Server.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Server.hs b/lib/Server.hs
index 3c1e84b..93046f8 100644
--- a/lib/Server.hs
+++ b/lib/Server.hs
@@ -53,7 +53,7 @@ import Yesod (toWaiAppPlain)
import Conferer (fetch, mkConfig)
import Extrapolation (Extrapolator (..),
- LinearExtrapolator)
+ LinearExtrapolator (..))
import System.IO.Unsafe
import Config (ServerConfig)
@@ -105,7 +105,7 @@ server gtfs@GTFS{..} dbpool = handleDebugAPI
onError
pure Nothing
Just running@Running{..} -> do
- let anchor = extrapolateAnchorFromPing @LinearExtrapolator gtfs running ping
+ let anchor = extrapolateAnchorFromPing LinearExtrapolator gtfs running ping
-- TODO: are these always inserted in order?
runSql dbpool $ do
insert ping
@@ -129,7 +129,7 @@ server gtfs@GTFS{..} dbpool = handleDebugAPI
-- ignore this and continue sending messages, which will continue to be handled.
liftIO $ handleTrainPing (WS.sendClose conn ("" :: ByteString)) ping >>= \case
Just anchor -> WS.sendTextData conn (A.encode anchor)
- Nothing -> pure ()
+ Nothing -> pure ()
handleDebugState = do
now <- liftIO getCurrentTime
runSql dbpool $ do