Skip to content

BigQuery: populate timeout parameter for getQueryResults - #4209

Merged
tswast merged 3 commits into
googleapis:bigquery-b2from
tswast:bqb2-timeout
Oct 18, 2017
Merged

BigQuery: populate timeout parameter for getQueryResults#4209
tswast merged 3 commits into
googleapis:bigquery-b2from
tswast:bqb2-timeout

Conversation

@tswast

@tswasttswast commented Oct 17, 2017

Copy link
Copy Markdown
Contributor

This will allow QueryJob to respect the timeout value for futures.

Closes#4135.

This will allow QueryJob to respect the timeout value for futures.
@googlebotgooglebot added the cla: yes This human has signed the Contributor License Agreement. label Oct 17, 2017
if self._done_timeout is not None:
# Subtract a buffer of a 100 milliseconds for context switching,
# network latency, etc.
timeout_ms = int(1000 * self._done_timeout) - 100

This comment was marked as spam.

This comment was marked as spam.

if self.state != _DONE_STATE:
self._query_results = self._client._get_query_results(
self.job_id, retry)
self.job_id, retry,

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@tseavertseaver added the api: bigquery Issues related to the BigQuery API. label Oct 18, 2017
@tswast

Copy link
Copy Markdown
ContributorAuthor

Circle error is with Pub/Sub. cloud.google.bigquery tests are passing.

Discussed timeout exception in person. The timeout option for getQueryResults is a parameter, not enforced client-side. When the time expires, the API will return a successful response with the incomplete job state.

@tswast
tswast merged commit af3da30 into googleapis:bigquery-b2Oct 18, 2017
@tswast
tswast deleted the bqb2-timeout branch October 18, 2017 21:58
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigqueryIssues related to the BigQuery API.cla: yesThis human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@tswast@theacodes@tseaver@googlebot