()
| 47 | } |
| 48 | |
| 49 | func (j *Job) Stop() error { |
| 50 | j.m.Lock() |
| 51 | t := j.t |
| 52 | j.m.Unlock() |
| 53 | |
| 54 | if t == nil { |
| 55 | return nil |
| 56 | } |
| 57 | |
| 58 | t.Kill(nil) |
| 59 | return t.Wait() |
| 60 | } |
| 61 | |
| 62 | func (j *Job) Run(ctx devspacecontext.Context, args []string, environ expand.Environ) error { |
| 63 | if ctx.IsDone() { |