func()

in pkg/procmanager/procmanager.go [39:62]


func (pm *ProcManager) RunRepeatWithRetries(
	ctx context.Context,
	args []string,
	stdIn io.Reader,
	stdOut io.Writer,
	stdErr io.Writer,
	cmdDir string,
	retries int,
	retryOnErrors []string,
	retryDelay int,
	containerName string,
	repeat int) error {
	var aggErrors util.Errors
	for i := 0; i <= repeat; i++ {
		innerErr := pm.RunWithRetries(ctx, args, stdIn, stdOut, stdErr, cmdDir, retries, retryOnErrors, retryDelay, containerName)
		if innerErr != nil {
			aggErrors = append(aggErrors, innerErr)
		}
	}
	if len(aggErrors) > 0 {
		return errors.New(aggErrors.String())
	}
	return nil
}