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

Method setComplete

provisionerd/runner/runner.go:292–299  ·  view source on GitHub ↗

setComplete is an internal function to set the job to completed. This does not send the completedJob.

(c *proto.CompletedJob)

Source from the content-addressed store, hash-verified

290
291// setComplete is an internal function to set the job to completed. This does not send the completedJob.
292func (r *Runner) setComplete(c *proto.CompletedJob) {
293 r.mutex.Lock()
294 defer r.mutex.Unlock()
295 if r.completedJob == nil {
296 r.completedJob = c
297 r.cond.Signal()
298 }
299}
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) {

Callers 1

doCleanFinishMethod · 0.95

Calls 3

SignalMethod · 0.65
LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected