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

feat: added support for query caching in aw-client #501

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

ErikBjare
Copy link
Member

@ErikBjare ErikBjare commented Nov 15, 2023

Builds on ActivityWatch/aw-client-js#44 to accomplish ActivityWatch/activitywatch#991

Also fixed so that we don't fetch bucket events if vis_timeline is not in the Activity view. (big perf improvement, major decrease in requests!)

For now there will be some verbose logs to make it easy to debug if something is not working, but it can easily be removed in the future.

For now the cache is cleared on page reload.

… fetch bucket events if vis_timeline is not in the Activity view
Copy link

codecov bot commented Nov 15, 2023

Codecov Report

Attention: 13 lines in your changes are missing coverage. Please review.

Comparison is base (a3f9e7d) 24.00% compared to head (cf7f197) 23.94%.

Files Patch % Lines
src/stores/activity.ts 0.00% 13 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #501      +/-   ##
==========================================
- Coverage   24.00%   23.94%   -0.06%     
==========================================
  Files          27       27              
  Lines        1600     1604       +4     
  Branches      266      267       +1     
==========================================
  Hits          384      384              
- Misses       1191     1195       +4     
  Partials       25       25              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ErikBjare ErikBjare merged commit 33784bd into master Nov 15, 2023
7 checks passed
@ErikBjare ErikBjare deleted the dev/query-caching branch November 15, 2023 12:10
@@ -306,6 +306,7 @@ export default {
},
methods: {
getTimelineBuckets: async function () {
if (this.type != 'vis_timeline') return;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This got rid of a ton of unnecessary requests!

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.

None yet

1 participant