Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

Commit e6e3c46

Browse files
committed
docs: explain retry behavior for DONE jobs
1 parent bb9a94c commit e6e3c46

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

google/cloud/bigquery/job/base.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,9 @@ def result(self, retry=DEFAULT_RETRY, timeout=None):
635635
"""Start the job and wait for it to complete and get the result.
636636
637637
Args:
638-
retry (Optional[google.api_core.retry.Retry]): How to retry the RPC.
638+
retry (Optional[google.api_core.retry.Retry]):
639+
How to retry the RPC. If the job state is ``DONE``, retrying is aborted
640+
early, as the job will not change anymore.
639641
timeout (Optional[float]):
640642
The number of seconds to wait for the underlying HTTP transport
641643
before using ``retry``.

google/cloud/bigquery/job/query.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -979,7 +979,8 @@ def done(self, retry=DEFAULT_RETRY, timeout=None, reload=True):
979979
980980
Args:
981981
retry (Optional[google.api_core.retry.Retry]):
982-
How to retry the call that retrieves query results.
982+
How to retry the call that retrieves query results. If the job state is
983+
``DONE``, retrying is aborted early, as the job will not change anymore.
983984
timeout (Optional[float]):
984985
The number of seconds to wait for the underlying HTTP transport
985986
before using ``retry``.
@@ -1128,7 +1129,9 @@ def result(
11281129
max_results (Optional[int]):
11291130
The maximum total number of rows from this request.
11301131
retry (Optional[google.api_core.retry.Retry]):
1131-
How to retry the call that retrieves rows.
1132+
How to retry the call that retrieves rows. If the job state is
1133+
``DONE``, retrying is aborted early even if the results are not
1134+
availalbe, as this will not change anymore.
11321135
timeout (Optional[float]):
11331136
The number of seconds to wait for the underlying HTTP transport
11341137
before using ``retry``.

0 commit comments

Comments
 (0)