Skip to content

Commit

Permalink
feat: include SSLError as error worth to retry
Browse files Browse the repository at this point in the history
  • Loading branch information
deryrahman committed Apr 23, 2024
1 parent dc6aec4 commit 6c96b67
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion task/bq2bq/executor/bumblebee/bigquery_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ def __init__(self, client, labels, writer, retry_timeout = None, on_job_finish =
self.client = client
self.labels = labels
self.writer = writer
if_additional_transient_error = if_exception_type(requests.exceptions.Timeout)
if_additional_transient_error = if_exception_type(
requests.exceptions.Timeout,
requests.exceptions.SSLError,
)
predicate = if_exception_funcs(if_transient_error, if_additional_transient_error)
retry = bigquery.DEFAULT_RETRY.with_deadline(retry_timeout) if retry_timeout else bigquery.DEFAULT_RETRY
retry.with_predicate(predicate)
Expand Down

0 comments on commit 6c96b67

Please sign in to comment.