Skip to content

Commit

Permalink
docs: explain retry behavior for DONE jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
plamut committed Feb 22, 2021
1 parent bb9a94c commit e6e3c46
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 3 additions & 1 deletion google/cloud/bigquery/job/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,9 @@ def result(self, retry=DEFAULT_RETRY, timeout=None):
"""Start the job and wait for it to complete and get the result.
Args:
retry (Optional[google.api_core.retry.Retry]): How to retry the RPC.
retry (Optional[google.api_core.retry.Retry]):
How to retry the RPC. If the job state is ``DONE``, retrying is aborted
early, as the job will not change anymore.
timeout (Optional[float]):
The number of seconds to wait for the underlying HTTP transport
before using ``retry``.
Expand Down
7 changes: 5 additions & 2 deletions google/cloud/bigquery/job/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,8 @@ def done(self, retry=DEFAULT_RETRY, timeout=None, reload=True):
Args:
retry (Optional[google.api_core.retry.Retry]):
How to retry the call that retrieves query results.
How to retry the call that retrieves query results. If the job state is
``DONE``, retrying is aborted early, as the job will not change anymore.
timeout (Optional[float]):
The number of seconds to wait for the underlying HTTP transport
before using ``retry``.
Expand Down Expand Up @@ -1128,7 +1129,9 @@ def result(
max_results (Optional[int]):
The maximum total number of rows from this request.
retry (Optional[google.api_core.retry.Retry]):
How to retry the call that retrieves rows.
How to retry the call that retrieves rows. If the job state is
``DONE``, retrying is aborted early even if the results are not
availalbe, as this will not change anymore.
timeout (Optional[float]):
The number of seconds to wait for the underlying HTTP transport
before using ``retry``.
Expand Down

0 comments on commit e6e3c46

Please sign in to comment.