MCPcopy Index your code
hub / github.com/coder/coder / setFail

Method setFail

provisionerd/runner/runner.go:302–310  ·  view source on GitHub ↗

setFail is an internal function to set the job to failed. This does not send the failedJob.

(f *proto.FailedJob)

Source from the content-addressed store, hash-verified

300
301// setFail is an internal function to set the job to failed. This does not send the failedJob.
302func (r *Runner) setFail(f *proto.FailedJob) {
303 r.mutex.Lock()
304 defer r.mutex.Unlock()
305 if r.failedJob == nil {
306 f.JobId = r.job.JobId
307 r.failedJob = f
308 r.cond.Signal()
309 }
310}
311
312// ForceStop signals all goroutines to stop and prevents any further API calls back to coder server for this job
313func (r *Runner) ForceStop() {

Callers 1

doCleanFinishMethod · 0.95

Calls 3

SignalMethod · 0.65
LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected