class_docstr: A class representing an H2O Job.
class_docstr_tok: ["A","class","representing","an","H2O","Job","."]
code: def _refresh_job_status(self):
      if self._poll_count <= 0:
          raise StopIteration("")
      jobs = self._query_job_status_safe()
      self.job = jobs["jobs"][0] if "jobs" in jobs else jobs["job"][0]
      self.status = self.job["status"]
      self.progress = self.job["progress"]
      self.exception = self.job["exception"]
      self.warnings = (
          self.job["warnings"] if "warnings" in self.job else None
      )
      self._poll_count -= 1
      # Sometimes the server may report the job at 100% but still having status "RUNNING" -- we work around this
      # by showing progress at 99% instead. Sometimes the server may report the job at 0% but having status "DONE",
      # in this case we set the progress to 100% manually.
      if self.status == "CREATED":
          self.progress = 0
      if self.status == "RUNNING":
          self.progress = clamp(self.progress, 0, 0.99)
      if self.status == "DONE":
          self.progress = 1
      if self.status == "FAILED":
          raise StopIteration("failed")
      if self.status == "CANCELLED":
          raise StopIteration("cancelled by the server")
      return self.progress
  
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 6 for calling the H2OJob obj's underlying member method code with example usage: obj._refresh_job_status() and returns: self