From 126d17c96fe0730e4ae8775ca2cd4f666b6e7d61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Sat, 28 Jun 2025 09:46:28 +0200 Subject: Do not copy job error details to JobFinished message --- src/Job.hs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Job.hs b/src/Job.hs index 5435cbd..ee901ee 100644 --- a/src/Job.hs +++ b/src/Job.hs @@ -90,11 +90,16 @@ textJobStatus = \case JobWaiting _ -> "waiting" JobRunning -> "running" JobSkipped -> "skipped" - JobError err -> "error\n" <> footnoteText err + JobError _ -> "error" JobFailed -> "failed" JobCancelled -> "cancelled" JobDone _ -> "done" +textJobStatusDetails :: JobStatus a -> Text +textJobStatusDetails = \case + JobError err -> footnoteText err <> "\n" + _ -> "" + data JobManager = JobManager { jmSemaphore :: TVar Int @@ -282,7 +287,7 @@ updateStatusFile path outVar = void $ liftIO $ forkIO $ loop Nothing status <- readTVar outVar when (Just status == prev) retry return status - T.writeFile path $ textJobStatus status <> "\n" + T.writeFile path $ textJobStatus status <> "\n" <> textJobStatusDetails status when (not (jobStatusFinished status)) $ loop $ Just status jobStorageSubdir :: JobId -> FilePath -- cgit v1.2.3