More information and care on KeyboardInterrupt#1239
Merged
rolandwalker merged 1 commit intoJul 4, 2025
Conversation
mycli is already _much_ better at cancelling queries on KeyboardInterrupt, compared to the vendor client. But not perfect -- and sometimes the result is an unfortunate runaway query. Here we: * catch the case that "ok" is not in the status string, and emit a warning in red. Previously we only caught Exceptions. * add an echo to the debugged path in which cancellation is skipped. * downgrade the routine cancellation message to blue and add the query id number. The first and second changes are intended to help the user notice the cases in which we fail to interrupt, and know that we failed. The third change is intended to help in unknown cases, in which we believe that we succeeded, but didn't interrupt.
rolandwalker
force-pushed
the
RW/more-informative-query-cancel-keyboard-interrupt
branch
from
June 7, 2025 12:39
a84c728 to
aa46615
Compare
rolandwalker
deleted the
RW/more-informative-query-cancel-keyboard-interrupt
branch
July 4, 2025 13:27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
mycli is already much better at cancelling queries on
KeyboardInterrupt, compared to the vendor client. But not perfect -- and sometimes the result is an unfortunate runaway query.Here we:
Exceptions.The first and second changes are intended to help the user notice the cases in which we fail to interrupt, and know that we failed. The third change is intended to help in unknown cases, in which we believe that we succeeded, but didn't actually interrupt.
Checklist
changelog.md.AUTHORSfile (or it's already there).