msg should not have a terminating newline
(blockId string, msg string)
| 1589 | |
| 1590 | // msg should not have a terminating newline |
| 1591 | func writeMutedMessageToTerminal(blockId string, msg string) { |
| 1592 | if blockId == "" { |
| 1593 | return |
| 1594 | } |
| 1595 | ctx, cancelFn := context.WithTimeout(context.Background(), DefaultTimeout) |
| 1596 | defer cancelFn() |
| 1597 | fullMsg := "\x1b[90m" + msg + "\x1b[0m\r\n" |
| 1598 | err := doWFSAppend(ctx, waveobj.MakeORef(waveobj.OType_Block, blockId), JobOutputFileName, []byte(fullMsg)) |
| 1599 | if err != nil { |
| 1600 | log.Printf("error writing muted message to terminal (blockid=%s): %v", blockId, err) |
| 1601 | } |
| 1602 | } |
| 1603 | |
| 1604 | func writeJobTerminationMessage(ctx context.Context, jobId string, job *waveobj.Job, msg string) { |
| 1605 | if job == nil { |
no test coverage detected