@@ -85,14 +85,14 @@ createConfig :: IO Config
85createConfig = do
85createConfig = do
86 mng <- newManager tlsManagerSettings
86 mng <- newManager tlsManagerSettings
87 cfg <- atomically $ Config <$> newTVar 0 <*> newTVar 0 <*> newTVar M.empty <*> newTVar M.empty <*> return mng <*> newTVar M.empty <*> newTVar 0 <*> newTVar (CB.empty 20)
87 cfg <- atomically $ Config <$> newTVar 0 <*> newTVar 0 <*> newTVar M.empty <*> newTVar M.empty <*> return mng <*> newTVar M.empty <*> newTVar 0 <*> newTVar (CB.empty 20)
88− forkIO . forever $ threadDelay 7000000 >> (runHandler . createApp cfg $ startAddingPosts 20 cfg >>= uncurry sendUpdate)
88+ forkIO . forever $ threadDelay 2000000 >> (runHandler . createApp cfg $ startAddingPosts 20 cfg >>= uncurry sendUpdate)
89 return cfg
89 return cfg
91type Token = Int
91type Token = Int
93data TokenizedResponse d = TokenizedResponse {
93data TokenizedResponse d = TokenizedResponse {
94 token :: Token,
94 token :: Token,
95− reponse :: d
95+ response :: d
96} deriving Generic
96} deriving Generic
98instance ToJSON d => ToJSON (TokenizedResponse d)
98instance ToJSON d => ToJSON (TokenizedResponse d)
@@ -165,7 +165,7 @@ startAddingPosts lim cfg = do
165 let us = users cfg
165 let us = users cfg
166 let ps = posts cfg
166 let ps = posts cfg
168− a <- liftIO $ loremBacon (manager cfg) (Just AllMeat) (Just lim) (Just False)
168+ a <- liftIO $ loremBacon (manager cfg) (Just AllMeat) (Just lim) (Just 0)
169 g <- liftIO newStdGen
169 g <- liftIO newStdGen
170 let rns = randoms g
170 let rns = randoms g