Skip to content

Commit ec19acb

Browse files
Mazi02claude
andcommitted
runner_manager: treat unknown runner job as ended
The runner only tracks jobs of its current process while the job rows live in the db, so NotFound is the normal case after a regular run, a double click on "end stream" or a runner restart - and turned every such click into a HTTP 500. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 7799101 commit ec19acb

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

pkg/runner_manager/manager.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,11 @@ func (m *Manager) endRunnerJob(ctx context.Context, job model.StreamRunnerJob, d
763763
DiscardVod: ptr.Take(discardVoD),
764764
})
765765
if err != nil {
766+
// a job the runner doesn't know is already over, which is what we want anyway
767+
if status.Code(err) == codes.NotFound {
768+
m.logger.Info("runner does not know job, considering it ended", "runner", job.RunnerHostname, "job", job.JobID)
769+
return nil
770+
}
766771
return fmt.Errorf("request stream end for job %s: %w", job.JobID, err)
767772
}
768773
return nil

0 commit comments

Comments
 (0)