Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Upcoming (TBD)
==============

Bug Fixes
--------
* Let the `beep_after_seconds` slow query alert happen before paged output.


Internal
--------
* `pyproject.toml` readability tweak.
Expand Down
12 changes: 6 additions & 6 deletions mycli/main_modes/repl.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,9 @@ def _output_results(
)

duration = time.time() - start
if mycli.beep_after_seconds > 0 and duration >= mycli.beep_after_seconds:
assert mycli.prompt_session is not None
mycli.prompt_session.output.bell()
try:
if result_count > 0:
if runner:
Expand All @@ -556,9 +559,6 @@ def _output_results(
finally:
if runner:
runner.stop_rendering()
if mycli.beep_after_seconds > 0 and duration >= mycli.beep_after_seconds:
assert mycli.prompt_session is not None
mycli.prompt_session.output.bell()
if special_commands.is_timing_enabled():
mycli.output_timing(f'Time: {duration:0.03f}s')
except KeyboardInterrupt:
Expand Down Expand Up @@ -648,6 +648,9 @@ def _single_paged_output_results(
max_width=max_width,
)
duration = time.time() - start
if mycli.beep_after_seconds > 0 and duration >= mycli.beep_after_seconds:
assert mycli.prompt_session is not None
mycli.prompt_session.output.bell()

if result_count > 0:
mycli.log_output('')
Expand All @@ -662,9 +665,6 @@ def _single_paged_output_results(
mycli.log_output(result.status_plain)
yield f'{result.status_plain}\n'

if mycli.beep_after_seconds > 0 and duration >= mycli.beep_after_seconds:
assert mycli.prompt_session is not None
mycli.prompt_session.output.bell()
if special_commands.is_timing_enabled():
timing = f'Time: {duration:0.03f}s'
mycli.log_output(timing)
Expand Down
Loading