Tiny naming fix.

This commit is contained in:
Martin Sosic 2020-10-06 21:31:18 +02:00
parent a06410dad8
commit 6e41c1dd84

View File

@ -26,17 +26,17 @@ runProcessAsJob :: P.CreateProcess -> J.JobType -> J.Job
runProcessAsJob process jobType chan = do
(CP.ClosedStream, stdoutStream, stderrStream, processHandle) <- CP.streamingProcess process
let stdout = runConduit $ stdoutStream .| CL.mapM_
let forwardStdoutToChan = runConduit $ stdoutStream .| CL.mapM_
(\bs -> writeChan chan $ J.JobMessage { J._data = J.JobOutput (BS.unpack bs) J.Stdout
, J._jobType = jobType })
let stderr = runConduit $ stderrStream .| CL.mapM_
let forwardStderrToChan = runConduit $ stderrStream .| CL.mapM_
(\bs -> writeChan chan $ J.JobMessage { J._data = J.JobOutput (BS.unpack bs) J.Stderr
, J._jobType = jobType })
exitCode <- runConcurrently $
Concurrently stdout *>
Concurrently stderr *>
Concurrently forwardStdoutToChan *>
Concurrently forwardStderrToChan *>
Concurrently (CP.waitForStreamingProcess processHandle)
writeChan chan $ J.JobMessage { J._data = J.JobExit exitCode