def __update_state(self):
    """Fetches most up to date state from db."""
    # Only if the job was not in a terminal state.
    if self._state.active:
      self._state = self.__get_state_by_id(self.job_config.job_id)
Fetches most up to date state from db.