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

Remove cached responses older than 4 mins #318

Merged
merged 10 commits into from
Jan 22, 2024
Merged

Remove cached responses older than 4 mins #318

merged 10 commits into from
Jan 22, 2024

Conversation

peterdudfield
Copy link
Collaborator

@peterdudfield peterdudfield commented Jan 22, 2024

Pull Request

Description

remove old cache (which is copied over from sites api)
had to get pathy==0.10.3 to get it working

How Has This Been Tested?

CI tests

  • Yes

Checklist:

  • My code follows OCF's coding style guidelines
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked my code and corrected any misspellings

Copy link

codecov bot commented Jan 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (4f2ff49) 95.69% compared to head (0b80a57) 95.40%.
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #318      +/-   ##
==========================================
- Coverage   95.69%   95.40%   -0.30%     
==========================================
  Files          20       20              
  Lines        1138     1153      +15     
==========================================
+ Hits         1089     1100      +11     
- Misses         49       53       +4     

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

@peterdudfield peterdudfield marked this pull request as ready for review January 22, 2024 14:19
@peterdudfield peterdudfield self-assigned this Jan 22, 2024
Copy link
Contributor

@braddf braddf left a comment

Choose a reason for hiding this comment

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

One comment but otherwise makes sense and LGTM 👍

@@ -52,6 +79,8 @@ def wrapper(*args, **kwargs): # noqa
if var in route_variables:
Copy link
Contributor

Choose a reason for hiding this comment

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

Just checking as you mentioned this briefly @peterdudfield, is there anything else you can see in this dict that could be removed to make the keys more reusable/less long? Other than ["session", "user", "request"]

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks, there might be, I'll put them in a different issue as we might be able to get rid of some

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@braddf braddf changed the title remove old cache Remove cached responses older than 2 mins Jan 22, 2024
@braddf braddf changed the title Remove cached responses older than 2 mins Remove cached responses older than 4 mins Jan 22, 2024
@peterdudfield peterdudfield merged commit 3aa4f6a into main Jan 22, 2024
3 of 4 checks passed
@peterdudfield peterdudfield deleted the rm-old-cache branch January 22, 2024 17:09
Copy link

sentry-io bot commented Jan 22, 2024

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ RuntimeError: dictionary changed size during iteration /v0/solar/GB/gsp/forecast/all/ View Issue
  • ‼️ RuntimeError: dictionary changed size during iteration /v0/solar/GB/gsp/pvlive/{gsp_id} View Issue
  • ‼️ KeyError: '{"gsp_id": 26, "regime": "day-after"}' /v0/solar/GB/gsp/pvlive/{gsp_id} View Issue

Did you find this useful? React with a 👍 or 👎

@peterdudfield
Copy link
Collaborator Author

peterdudfield commented Jan 22, 2024

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ RuntimeError: dictionary changed size during iteration /v0/solar/GB/gsp/forecast/all/ View Issue

Did you find this useful? React with a 👍 or 👎

whats this @braddf ?

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