(ctx context.Context, jobId string, fileName string, data []byte)
| 792 | } |
| 793 | |
| 794 | func handleAppendJobFile(ctx context.Context, jobId string, fileName string, data []byte) error { |
| 795 | err := doWFSAppend(ctx, waveobj.MakeORef(waveobj.OType_Job, jobId), fileName, data) |
| 796 | if err != nil { |
| 797 | return fmt.Errorf("error appending to job file: %w", err) |
| 798 | } |
| 799 | |
| 800 | job, err := wstore.DBGet[*waveobj.Job](ctx, jobId) |
| 801 | if err != nil { |
| 802 | return fmt.Errorf("error getting job: %w", err) |
| 803 | } |
| 804 | if job != nil && job.AttachedBlockId != "" { |
| 805 | err = doWFSAppend(ctx, waveobj.MakeORef(waveobj.OType_Block, job.AttachedBlockId), fileName, data) |
| 806 | if err != nil { |
| 807 | return fmt.Errorf("error appending to block file: %w", err) |
| 808 | } |
| 809 | } |
| 810 | |
| 811 | return nil |
| 812 | } |
| 813 | |
| 814 | func runOutputLoop(ctx context.Context, jobId string, streamId string, reader *streamclient.Reader) { |
| 815 | defer reader.Close() |
no test coverage detected