def RetryUpload(self, job, job_id, error):
    if self.IsErrorRetryable(error):
      retry_count = 0
      sleep_interval = config_lib.CONFIG["BigQuery.retry_interval"]
      while retry_count < config_lib.CONFIG["BigQuery.retry_max_attempts"]:

        time.sleep(sleep_interval.seconds)
        logging.info("Retrying job_id: %s", job_id)
        retry_count += 1

        try:
          response = job.execute()
          return response
        except HttpError as e:
          if self.IsErrorRetryable(e):
            sleep_interval *= config_lib.CONFIG["BigQuery.retry_multiplier"]
            logging.exception("Error with job: %s, will retry in %s", job_id,
                              sleep_interval)
          else:
            raise BigQueryJobUploadError("Can't retry error code %s. Giving up"
                                         " on job: %s.", e.resp.status, job_id)
    else:
      raise BigQueryJobUploadError("Can't retry error code %s. Giving up on "
                                   "job: %s.", error.resp.status, job_id)

    raise BigQueryJobUploadError("Giving up on job:%s after %s retries.",
                                 job_id, retry_count)
Retry the BigQuery upload job.
dataset/ETHPy150Open google/grr/grr/lib/bigquery.py/BigQueryClient.RetryUpload