MCPcopy Index your code
hub / github.com/devspace-sh/devspace / restart

Method restart

pkg/devspace/devpod/devpod.go:200–219  ·  view source on GitHub ↗
(ctx devspacecontext.Context, devPodConfig *latest.DevPod, options Options)

Source from the content-addressed store, hash-verified

198}
199
200func (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
221func (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

Callers 1

startWithRetryMethod · 0.95

Calls 6

startWithRetryMethod · 0.95
IsDoneMethod · 0.65
LogMethod · 0.65
DoneMethod · 0.65
ContextMethod · 0.65
InfofMethod · 0.45

Tested by

no test coverage detected