From c553414b388685e747f94495c85ea5f50b97f52a Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 26 Sep 2019 11:00:52 +0200 Subject: [PATCH] chore: reduce number of workers during testing --- app/DevelMain.hs | 4 ++-- config/test-settings.yml | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/DevelMain.hs b/app/DevelMain.hs index ab065aaa2..b850b33b2 100644 --- a/app/DevelMain.hs +++ b/app/DevelMain.hs @@ -67,7 +67,7 @@ update = do restartAppInNewThread tidStore = modifyStoredIORef tidStore $ \tid -> do killThread tid withStore doneStore takeMVar - readStore doneStore >>= start + withStore doneStore start -- | Start the server in a separate thread. @@ -77,7 +77,7 @@ update = do (port, site, app) <- getApplicationRepl resourceForkIO $ do finally (liftIO $ runSettings (setPort port defaultSettings) app) - (liftIO $ shutdownApp site >> putMVar done ()) + (liftIO $ shutdownApp site `finally` putMVar done ()) -- | kill the server shutdown :: IO () diff --git a/config/test-settings.yml b/config/test-settings.yml index 23f59aed5..5fb61bedf 100644 --- a/config/test-settings.yml +++ b/config/test-settings.yml @@ -8,3 +8,5 @@ log-settings: destination: "test.log" auth-dummy-login: true + +job-workers: 1