class_docstr: A class representing an H2O Job.
class_docstr_tok: ["A","class","representing","an","H2O","Job","."]
code: def _query_job_status_safe(self):
      result = None
      attempts = 0
      last_err = None
      while attempts < 30:
          try:
              attempts += 1
              result = h2o.api("GET /3/Jobs/%s" % self.job_key)
              self.job_poll_success = True  # only retry if there was at least one OK response
              break
          except (
              H2OConnectionError,
              H2OResponseError,
              H2OServerError,
          ) as e:
              last_err = e
              if self.job_poll_success:
                  if self.auto_recoverable:
                      print(
                          "Job request failed %s, waiting for cluster to restart."
                          % e.args[0]
                      )
                      time.sleep(10)
                  else:
                      # general/unknown failure - might be due to a temporary issue on the cluster (eg. a heavy load)
                      print(
                          "Job request failed %s, will retry after 3s."
                          % e.args[0]
                      )
                      time.sleep(3)
              else:
                  raise e
      if result:
          return result
      else:
          raise last_err
  
file_path: h2o-3/h2o-py/h2o/job.py
imports: import functools
  import warnings
  import time
  import h2o
  from h2o.exceptions import H2OJobCancelled, H2OConnectionError, H2OResponseError, H2OServerError
  from h2o.utils.progressbar import ProgressBar, PBWString, PBWBar, PBWPercentage
  from h2o.utils.shared_utils import clamp
label_desc: Use image node_id 5 for calling the H2OJob obj's underlying member method code with example usage: obj._query_job_status_safe() and returns: result