From 61e21346a6947327bf5394f6c73499621c494986 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Fri, 10 Apr 2020 16:33:00 -0700 Subject: Deploy herocomics.app production server This also includes some drive-by formatting changes and config changes needed to get it up and running. --- Com/MusicMeetsComics/Server/Init.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Com/MusicMeetsComics/Server/Init.hs') diff --git a/Com/MusicMeetsComics/Server/Init.hs b/Com/MusicMeetsComics/Server/Init.hs index 7ad3ebf..04ddc88 100644 --- a/Com/MusicMeetsComics/Server/Init.hs +++ b/Com/MusicMeetsComics/Server/Init.hs @@ -18,7 +18,7 @@ import qualified System.IO as IO -- | An action that creates a WAI 'Application' together with its resources, -- runs it, and tears it down on exit runApp :: (Config.Config -> Application) -> IO () -runApp app = bracket Config.acquire shutdownApp jog +runApp app = bracket Config.acquire shutdown jog where say = IO.hPutStrLn IO.stderr jog config = do @@ -39,8 +39,8 @@ compress :: Middleware compress = gzip def { gzipFiles = GzipCompress } -- | Takes care of cleaning up 'Config.Config' resources -shutdownApp :: Config.Config -> IO () -shutdownApp cfg = do +shutdown :: Config.Config -> IO () +shutdown cfg = do _ <- Katip.closeScribes (Config.configLogEnv cfg) -- Monad.Metrics does not provide a function to destroy metrics store -- so, it'll hopefully get torn down when async exception gets thrown -- cgit v1.2.3