-
-
Notifications
You must be signed in to change notification settings - Fork 44
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
Improved queue #22
Improved queue #22
Conversation
This has passed integration tests in ActivityWatch/activitywatch#82 |
test/test_failqueue.py does not seem to work anymore? |
@johan-bjareholt It works for me now, please test it yourself. |
So we cannot queue insert_event anymore? That could potentially mess up aw-watcher-afk in set_state if aw-server is not accessible. |
@johan-bjareholt But wasn't aw-watcher-afk rewritten to use heartbeats? That should have removed the need for using Edit: I just checked and it seems to me that the use of |
Send event is still required! Heartbeats are only for updating the inserted events, and i use send_event every time we change state to be able to track the hibernation state (since you obviously cannot do heartbeats when the computer is hibernating). |
Pushed a fix in aw-watcher-afk straight to master so insert_event is no longer required. ActivityWatch/aw-watcher-afk@ebaa72e @ErikBjare Should we merge this now? Seems to work fine |
Great, merging. |
Haven't done any testing to speak of, but I think this is an improvement.
Should improve reliability overall, thread should also cleanly exit on program close using
atexit
(which we should probably use in other places as well instead of handling signals).