Skip to content

Commit

Permalink
Pass Retry object to retry transient errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Omar Salama committed Jul 8, 2024
1 parent 0627aa2 commit 48aa068
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dbt/adapters/bigquery/dataproc/batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
GetBatchRequest,
)
from google.protobuf.json_format import ParseDict
from google.api_core.retry import Retry

from dbt.adapters.bigquery.connections import DataprocBatchConfig

Expand Down Expand Up @@ -37,6 +38,7 @@ def poll_batch_job(
time.sleep(1)
response = job_client.get_batch( # type: ignore
request=GetBatchRequest(name=batch_name), # type: ignore
retry=Retry()
)
run_time = datetime.now().timestamp() - response.create_time.timestamp() # type: ignore
state = response.state
Expand Down

0 comments on commit 48aa068

Please sign in to comment.