diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Job.hs | 9 | 
1 files changed, 7 insertions, 2 deletions
| @@ -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 |