feat: add check for broken watchers every 5 minutes#111
Open
RTnhN wants to merge 3 commits intoActivityWatch:masterfrom
Open
feat: add check for broken watchers every 5 minutes#111RTnhN wants to merge 3 commits intoActivityWatch:masterfrom
RTnhN wants to merge 3 commits intoActivityWatch:masterfrom
Conversation
Sometimes I find that my watchers die randomly. While they are checked 2 seconds after start, they are not checked again after that. This makes it check every 5 minutes after start and will give the standard popup and restart dialog box.
There was a problem hiding this comment.
❌ Changes requested. Reviewed everything up to 4c44b86 in 1 minute and 36 seconds
More details
- Looked at
47lines of code in2files - Skipped
1files when reviewing. - Skipped posting
5drafted comments based on config settings.
1. aw_qt/trayicon.py:172
- Draft comment:
Consider refactoring repetitive singleShot timers. Scheduling rebuild_modules_menu inside check_module_status (line 170) may be redundant since rebuild_modules_menu already reschedules itself (line 158). Also, using a persistent QTimer might be cleaner. - Reason this comment was not posted:
Comment was on unchanged code.
2. pyproject.toml:16
- Draft comment:
Python and PyQt6 version updates look correct; verify that dependent modules are compatible with Python ^3.9 and PyQt6 6.8.1. - Reason this comment was not posted:
Confidence changes required:20%<= threshold50%
None
3. pyproject.toml:16
- Draft comment:
Python version updated to ^3.9. Ensure that all dependencies and CI configurations are compatible with Python 3.9. - Reason this comment was not posted:
Confidence changes required:50%<= threshold50%
None
4. pyproject.toml:31
- Draft comment:
PyQt6 versions bumped to 6.8.1. Verify that these updates do not break API compatibility with existing code. - Reason this comment was not posted:
Confidence changes required:50%<= threshold50%
None
5. pyproject.toml:4
- Draft comment:
Consider changing 'Trayicon' to 'Tray icon' in the description for improved clarity. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
Workflow ID: wflow_I4c5dLEir6qa6YC2
Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.
I realized that the way that I wrote it initially had bugs. This is a lot more clean and fixes the TODO comments that were already here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sometimes my watchers will die after some time which causes me to lose data. Instead of forcing a restart of the watcher, this will just allow the user to decide to restart the watcher or not. I would be okay with checking more frequently, but I think that 5 minutes is a good middle between taking lots of resources and making sure that dead watchers don't lose a lot of data.
Also, when I was trying to develop this, I realized that the base python version (3.8) is EOL now, so installing it and running pyqt6 with the original version did not work. It can't find a version of pyqt6 that fits the lock file. So this updates both the python version and the pyqt6 version. I think this is a reason why #107 failed CI.
Let me know if you have any suggestions or comments about this. I know that aw-tauri is being worked on, but losing data is pretty discouraging right now.
Related to #103
Important
Adds a periodic check for broken watchers every 5 minutes and updates Python and PyQt6 versions in
pyproject.toml.check_module_status()intrayicon.py.^3.9,<3.14inpyproject.toml.PyQt6andPyQt6-Qt6to version6.8.1inpyproject.toml.This description was created by
for 4c44b86. It will automatically update as commits are pushed.