mycli
mycli copied to clipboard
More information and care on `KeyboardInterrupt`
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:
- 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 actually interrupt.
Checklist
- [x] I've added this contribution to the
changelog.md. - [x] I've added my name to the
AUTHORSfile (or it's already there).