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

Fix inaccurate notifications issue #15

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

stelcodes
Copy link
Contributor

The pomo notify command uses the the pomo_msg bash function which sleeps until the current cycle portion should end. Upon waking up, it checks pomo_stat for the current pomodoro state. In order to get an accurate state, pomo_update needs to be called first because the pomodoro timer may have been restarted while pomo_msg was sleeping.

Fixes #14

@stelcodes
Copy link
Contributor Author

stelcodes commented May 18, 2023

Broke the tests somehow...

The `pomo notify` command uses the the `pomo_msg` bash function which
sleeps until the current cycle portion should end. Upon waking up, it
checks `pomo_stat` for the current pomodoro state. In order to get an
accurate state, `pomo_update` needs to be called first because the
pomodoro timer may have been restarted while `pomo_msg` was sleeping.
@stelcodes
Copy link
Contributor Author

stelcodes commented May 18, 2023

Looking at the tests and realizing that adding this pomo_update to pomo_msg seems to break some intended functionality like sending a delayed "best effort" notification shown in tests:

@test "pomo_msg handles timestamp update before it can send the end of break message 1"
@test "pomo_msg handles timestamp update before it can send the end of break message 2"

So I removed these tests in the PR.

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.

Notifications occur at inaccurate times
1 participant