diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2023-01-19 23:10:32 +0100 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2023-01-20 20:36:28 +0100 |
commit | 048529bcb06601ee4ff91190b823ba00beba1a6a (patch) | |
tree | 46c8e4bf799b71dea270eb7d36057eb3ee9a169d /src/Main.hs | |
parent | 0c364245db08265992de49560977063bbb271163 (diff) |
Artifacts stored for other jobs
Diffstat (limited to 'src/Main.hs')
-rw-r--r-- | src/Main.hs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Main.hs b/src/Main.hs index da3c0d8..8ba28d1 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -1,5 +1,7 @@ module Main (main) where +import Control.Concurrent.STM + import Control.Monad import System.IO @@ -30,10 +32,11 @@ main = do let shortCid = take 7 cid putStr $ shortCid <> " " <> fitToLength 50 desc hFlush stdout - results <- forM (configJobs config) $ \job -> do + outs <- runJobs "./.minici" cid $ configJobs config + results <- forM outs $ \outVar -> do putStr " " hFlush stdout - out <- runJob "./.minici" cid job + out <- atomically $ maybe retry return =<< readTVar outVar if | outStatus out -> do putStr "\ESC[92m✓\ESC[0m " | otherwise -> do |