(ctx context.Context, jobId string, job *waveobj.Job, msg string)
| 1602 | } |
| 1603 | |
| 1604 | func writeJobTerminationMessage(ctx context.Context, jobId string, job *waveobj.Job, msg string) { |
| 1605 | if job == nil { |
| 1606 | return |
| 1607 | } |
| 1608 | shouldWrite := jobTerminationMessageWritten.TestAndSet(jobId, true, func(val bool, exists bool) bool { |
| 1609 | return !exists || !val |
| 1610 | }) |
| 1611 | if shouldWrite { |
| 1612 | resetTerminalState(ctx, job.AttachedBlockId) |
| 1613 | writeMutedMessageToTerminal(job.AttachedBlockId, msg) |
| 1614 | } |
| 1615 | } |
no test coverage detected