class_docstr: Hook for Airbyte API.
  
  :param airbyte_conn_id: Optional. The name of the Airflow connection to get
      connection information for Airbyte. Defaults to "airbyte_default".
  :param api_version: Optional. Airbyte API version. Defaults to "v1".
class_docstr_tok: ["Hook","for","Airbyte","API",".",":","param","airbyte_conn_id",":","Optional",".","The","name","of","the","Airflow","connection","to","get","connection","information","for","Airbyte",".","Defaults","to","``","airbyte_default","''",".",":","param","api_version",":","Optional",".","Airbyte","API","version",".","Defaults","to","``","v1","''","."]
docstr: Poll a job to check if it finishes.
  
  :param job_id: Required. Id of the Airbyte job
  :param wait_seconds: Optional. Number of seconds between checks.
  :param timeout: Optional. How many seconds wait for job to be ready.
      Used only if ``asynchronous`` is False.
docstr_tok: ["Poll","a","job","to","check","if","it","finishes",".",":","param","job_id",":","Required",".","Id","of","the","Airbyte","job",":","param","wait_seconds",":","Optional",".","Number","of","seconds","between","checks",".",":","param","timeout",":","Optional",".","How","many","seconds","wait","for","job","to","be","ready",".","Used","only","if","``","asynchronous","``","is","False","."]
code: def wait_for_job(
      self,
      job_id: str | int,
      wait_seconds: float = 3,
      timeout: float | None = 3600,
  ) -> None:
      """
      Poll a job to check if it finishes.
  
      :param job_id: Required. Id of the Airbyte job
      :param wait_seconds: Optional. Number of seconds between checks.
      :param timeout: Optional. How many seconds wait for job to be ready.
          Used only if ``asynchronous`` is False.
      """
      state = None
      start = time.monotonic()
      while True:
          if timeout and start + timeout < time.monotonic():
              self.cancel_job(job_id=(int(job_id)))
              raise AirflowException(
                  f"Timeout: Airbyte job {job_id} is not ready after {timeout}s"
              )
          time.sleep(wait_seconds)
          try:
              job = self.get_job(job_id=(int(job_id)))
              state = job.json()["job"]["status"]
          except AirflowException as err:
              self.log.info(
                  "Retrying. Airbyte API returned server error when waiting for job: %s",
                  err,
              )
              continue
  
          if state in (self.RUNNING, self.PENDING, self.INCOMPLETE):
              continue
          if state == self.SUCCEEDED:
              break
          if state == self.ERROR:
              raise AirflowException(f"Job failed:\n{job}")
          elif state == self.CANCELLED:
              raise AirflowException(f"Job was cancelled:\n{job}")
          else:
              raise Exception(
                  f"Encountered unexpected state `{state}` for job_id `{job_id}`"
              )
  
file_path: airflow/airflow/providers/airbyte/hooks/airbyte.py
imports: from __future__ import annotations
  import time
  from typing import Any
  from airflow.exceptions import AirflowException
  from airflow.providers.http.hooks.http import HttpHook
label_desc: Use image node_id 2 for calling the AirbyteHook obj's underlying member method code with example usage: obj.wait_for_job(job_id, wait_seconds, timeout) without return types