diff options
| author | Roman Smrž <roman.smrz@seznam.cz> | 2026-07-06 12:02:29 +0200 |
|---|---|---|
| committer | Roman Smrž <roman.smrz@seznam.cz> | 2026-07-11 15:24:37 +0200 |
| commit | b162d2e23a500bb362aaf2b94d8d3ee8f3651163 (patch) | |
| tree | 43eb0809e27bda1d17490ce6f46d23013b77845d /src/Command/Run.hs | |
| parent | 4d2de6a51f555cb2365e161c082223e7d9f21bc8 (diff) | |
Diffstat (limited to 'src/Command/Run.hs')
| -rw-r--r-- | src/Command/Run.hs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Command/Run.hs b/src/Command/Run.hs index 63d1254..34a32d6 100644 --- a/src/Command/Run.hs +++ b/src/Command/Run.hs @@ -410,7 +410,14 @@ cmdRun (RunCommand RunOptions {..} args) = do outputEvent output $ LogMessage $ "Jobset failed: " <> shortCid <> " " <> T.pack err loop names (Just ( rest, next )) - handle @SomeException (\_ -> cancelAllJobs mngr) $ do + handle @SomeException + (\e -> do + if | Just UserInterrupt <- fromException e + -> outputEvent output RunInterruptedByUser + | otherwise + -> outputMessage output $ "exception in run loop: " <> T.pack (show e) + cancelAllJobs mngr + ) $ do loop [] =<< atomically (takeJobSource source) waitForJobs waitForJobs |