-
-
Notifications
You must be signed in to change notification settings - Fork 165
fix(query): configurable flood pulsetime to fix missing time with high poll intervals #875
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -49,6 +49,12 @@ interface State { | |
| showYearly: boolean; | ||
| useMultidevice: boolean; | ||
| requestTimeout: number; | ||
| /** | ||
| * Seconds used as the pulsetime argument to flood() in queries. | ||
| * Increase if you use a high watcher polling interval (e.g. set to 31 for 30s polling). | ||
| * See: https://github.com/ActivityWatch/activitywatch/issues/1177 | ||
| */ | ||
| floodPulsetime: number; | ||
|
|
||
| // Set to true if settings loaded | ||
| _loaded: boolean; | ||
|
|
@@ -90,6 +96,7 @@ export const useSettingsStore = defineStore('settings', { | |
| showYearly: false, | ||
| useMultidevice: false, | ||
| requestTimeout: 30, | ||
| floodPulsetime: 5, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The HTML input enforces |
||
|
|
||
| _loaded: false, | ||
| }), | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
flood()on older aw-server versionsThe PR description notes this change pairs with aw-core#139, which adds
pulsetimeas a named parameter toflood(). Users running an aw-server version that predates that change will suddenly receive a query with an unexpected second positional argument. Depending on how the query language dispatcher handles extra args, this could result in aTypeErroror similar runtime error that causes all activity queries to fail — with no fallback.Before landing, it is worth confirming that the aw-core query interpreter silently ignores extra positional arguments when
flood()is called with the old signature, and documenting the minimum required aw-server version if not.