Remove unnecessary select in pod runner
@@ -35,13 +35,11 @@ func (p *PodRunner) Run(ctx context.Context, fn func(context.Context, *v1.Pod) (
return nil, errors.Wrapf(err, "Failed to create pod")
}
go func() {
- select {
- case <-ctx.Done():
+ <-ctx.Done()
err := DeletePod(context.Background(), p.cli, pod)
if err != nil {
log.Error("Failed to delete pod ", err.Error())
}
- }
}()
return fn(ctx, pod)
}
