-
Notifications
You must be signed in to change notification settings - Fork 48
fix: send BigQuery cancel request when canceling bigframes process #103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -153,6 +153,11 @@ def wait_for_query_job( | |
except api_core_exceptions.GoogleAPICallError as exc: | ||
add_feedback_link(exc) | ||
raise | ||
except KeyboardInterrupt: | ||
query_job.cancel() | ||
print(f"Requested cancelation for {query_job.job_type} {query_job.job_id}...") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks Shobhit, created #111 to address these. |
||
# begin the cancel request before immediately rethrowing | ||
raise | ||
|
||
|
||
def wait_for_job(job: GenericJob, progress_bar: Optional[str] = None): | ||
|
@@ -190,6 +195,11 @@ def wait_for_job(job: GenericJob, progress_bar: Optional[str] = None): | |
except api_core_exceptions.GoogleAPICallError as exc: | ||
add_feedback_link(exc) | ||
raise | ||
except KeyboardInterrupt: | ||
job.cancel() | ||
print(f"Requested cancelation for {job.job_type} {job.job_id}...") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We may like to follow the following pattern done elsewhere for consistency:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks Shobhit, created #111 to address these. |
||
# begin the cancel request before immediately rethrowing | ||
raise | ||
|
||
|
||
def get_job_url(query_job: GenericJob): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kinda nitpick - English vocab is not my forte but I wondered about "cancelation" vs "cancellation" and looks like in
googleapis
repos the former is a rarity, the latter is commonly used.