(ctx devspacecontext.Context, devPodConfig *latest.DevPod, options Options)
| 198 | } |
| 199 | |
| 200 | func (d *devPod) restart(ctx devspacecontext.Context, devPodConfig *latest.DevPod, options Options) { |
| 201 | for { |
| 202 | err := d.startWithRetry(ctx, devPodConfig, options) |
| 203 | if err != nil { |
| 204 | if ctx.IsDone() { |
| 205 | return |
| 206 | } |
| 207 | |
| 208 | ctx.Log().Infof("Restart dev %s because of: %v", devPodConfig.Name, err) |
| 209 | select { |
| 210 | case <-ctx.Context().Done(): |
| 211 | return |
| 212 | case <-time.After(time.Second * 10): |
| 213 | continue |
| 214 | } |
| 215 | } |
| 216 | |
| 217 | return |
| 218 | } |
| 219 | } |
| 220 | |
| 221 | func (d *devPod) start(ctx devspacecontext.Context, devPodConfig *latest.DevPod, opts Options, parent *tomb.Tomb) error { |
| 222 | // check first if we need to replace the pod |
no test coverage detected