Skip to content
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

feat: Add ability to cancel dead queries #1159

Merged
merged 2 commits into from
Feb 14, 2023
Merged

feat: Add ability to cancel dead queries #1159

merged 2 commits into from
Feb 14, 2023

Conversation

czgu
Copy link
Collaborator

@czgu czgu commented Feb 11, 2023

previously, we would just send abort signal to the execution. But if the query is not running in celery, then nothing would be done. This PR adds more checks on the API side to update query status if the execution itself is gone

@czgu czgu marked this pull request as ready for review February 11, 2023 01:09

task = run_query_task.AsyncResult(execution.task_id)

if task.state == "PENDING":
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

celery task has another RECEIVED state, which also can be revoked. would be nice to add this case as well.

jczhong84
jczhong84 previously approved these changes Feb 14, 2023
@czgu czgu merged commit 51be7c6 into pinterest:master Feb 14, 2023
@czgu czgu deleted the cancel branch February 14, 2023 19:09
rohan-sh1 pushed a commit to CAI-TECHNOLOGIES/cai-ext-db-explorer that referenced this pull request Apr 11, 2023
* feat: Add ability to cancel read queries

* resolved comments
aidenprice pushed a commit to arrowtail-precision/querybook that referenced this pull request Jan 3, 2024
* feat: Add ability to cancel read queries

* resolved comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants