From 018b247aacf3aea7bea3e26e33a814a8fd40f54e Mon Sep 17 00:00:00 2001 From: Denis Tereshkin Date: Mon, 19 Jul 2021 12:54:10 +0700 Subject: [PATCH] Bump to lts-17.14 --- atrade-monitor.cabal | 7 ++++--- src/Main.hs | 6 ++++-- stack.yaml | 3 +-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/atrade-monitor.cabal b/atrade-monitor.cabal index f28e0ef..21009cb 100644 --- a/atrade-monitor.cabal +++ b/atrade-monitor.cabal @@ -1,10 +1,10 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.31.2. +-- This file has been generated from package.yaml by hpack version 0.34.4. -- -- see: https://github.com/sol/hpack -- --- hash: dab67d56afaa7dcc061e0130cc7ad1f8d8d8fc8b43f6d30a8662091a0a8bd9ac +-- hash: 4141f70beaab8672b6e6b4e228dcd630fdb6ab5cb7e81f88d9c047293d6b1081 name: atrade-monitor version: 0.1.0.0 @@ -25,7 +25,8 @@ executable atrade-monitor Paths_atrade_monitor hs-source-dirs: src - default-extensions: OverloadedStrings + default-extensions: + OverloadedStrings ghc-options: -threaded build-depends: aeson diff --git a/src/Main.hs b/src/Main.hs index e528dc6..c3bf289 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -77,9 +77,11 @@ main = do runWithConfig :: Config -> IO () runWithConfig config = do (inChan, outChan) <- newChan - threadIds <- forM (zip [0..] (cExecutables config)) $ \(i, execcfg) -> do - threadDelay (1000000 * i * cDelay config) + threadIds <- forM (zip [0..] (cExecutables config)) $ \(i, execcfg) -> forkIO $ do + let delay = 1000000 * i * cDelay config + putStrLn $ "Waiting " ++ show delay ++ " to spawn process: " ++ cExecutablePath execcfg + threadDelay delay putStrLn $ "Creating process: " ++ cExecutablePath execcfg (_, Just stdOut, Just stdErr, ph) <- createProcess $ (proc (cExecutablePath execcfg) (makeArgs (cGlobalArgs config) (cArgs execcfg))) { std_out = CreatePipe, std_err = CreatePipe } withFile (cLogPath execcfg) AppendMode $ \log -> handleIO (exceptionHandler inChan) $ do diff --git a/stack.yaml b/stack.yaml index 3d4ef20..4df3199 100644 --- a/stack.yaml +++ b/stack.yaml @@ -18,7 +18,7 @@ # # resolver: ./custom-snapshot.yaml # resolver: https://example.com/snapshots/2018-01-01.yaml -resolver: lts-12.9 +resolver: lts-17.14 # User packages to be built. # Various formats can be used as shown in the example below. @@ -39,7 +39,6 @@ packages: # using the same syntax as the packages field. # (e.g., acme-missiles-0.3) extra-deps: - - unagi-chan-0.4.1.0 - posix-pty-0.2.1.1 # Override default flag values for local packages and extra-deps