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

Improved queue #22

Merged
merged 12 commits into from
Jul 13, 2017
Merged

Improved queue #22

merged 12 commits into from
Jul 13, 2017

Conversation

ErikBjare
Copy link
Member

@ErikBjare ErikBjare commented Jun 25, 2017

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).

@ErikBjare
Copy link
Member Author

This has passed integration tests in ActivityWatch/activitywatch#82

@johan-bjareholt
Copy link
Member

test/test_failqueue.py does not seem to work anymore?

@ErikBjare
Copy link
Member Author

@johan-bjareholt It works for me now, please test it yourself.

@johan-bjareholt
Copy link
Member

So we cannot queue insert_event anymore? That could potentially mess up aw-watcher-afk in set_state if aw-server is not accessible.

@ErikBjare
Copy link
Member Author

ErikBjare commented Jul 9, 2017

@johan-bjareholt But wasn't aw-watcher-afk rewritten to use heartbeats? That should have removed the need for using insert_event, no?

Edit: I just checked and it seems to me that the use of insert_event there is no longer needed (provided we support receiving heartbeats with a duration, which we might not but probably should).

@johan-bjareholt
Copy link
Member

johan-bjareholt commented Jul 10, 2017

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).

@johan-bjareholt
Copy link
Member

johan-bjareholt commented Jul 13, 2017

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

@ErikBjare
Copy link
Member Author

Great, merging.

@ErikBjare ErikBjare merged commit 3122337 into master Jul 13, 2017
@ErikBjare ErikBjare deleted the dev/improved-queue branch July 13, 2017 16:07
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.

2 participants