From 0a2a578547b6396a0ba1f0e69cf0e967ebb6dbec Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 16 Mar 2020 08:52:25 +0100 Subject: [PATCH] chore: fix tests --- src/Application.hs | 4 ++-- src/Handler/Allocation/Accept.hs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Application.hs b/src/Application.hs index 1f6587ff4..918495cc6 100644 --- a/src/Application.hs +++ b/src/Application.hs @@ -88,7 +88,7 @@ import qualified Data.Set as Set import Handler.Utils.Routes (classifyHandler) -import qualified Data.Acid as Acid +import qualified Data.Acid.Memory as Acid import qualified Web.ServerSession.Backend.Acid as Acid -- Import all relevant handler modules here. @@ -250,7 +250,7 @@ mkSessionStore AppSettings{..} mcdSqlConnPool let mcdSqlMemcachedExpiration = memcachedExpiry return $ _SessionStorageMemcachedSql # MemcachedSqlStorage{..} | appServerSessionAcidFallback = liftIO $ - review _SessionStorageAcid . Acid.AcidStorage <$> Acid.openLocalStateFrom "sessions" Acid.emptyState + review _SessionStorageAcid . Acid.AcidStorage <$> Acid.openMemoryState Acid.emptyState | otherwise = throwM SessionStoreNotAvailable diff --git a/src/Handler/Allocation/Accept.hs b/src/Handler/Allocation/Accept.hs index 62f821ca8..a8aec85b4 100644 --- a/src/Handler/Allocation/Accept.hs +++ b/src/Handler/Allocation/Accept.hs @@ -122,8 +122,8 @@ allocationAcceptForm aId = runMaybeT $ do optimumProportion | allocationCapacity == 0 = 0 | otherwise = fromIntegral allocationPlacesRequested % fromIntegral allocationCapacity - allocHeat capN allocated - = invDualHeat (optimumAllocated capN) capN allocated + allocHeat capN + = invDualHeat (optimumAllocated capN) capN degenerateHeat capN = capN <= optimumAllocated capN