-
Notifications
You must be signed in to change notification settings - Fork 212
remove update-release-activity background job and calculate the release-activity on the fly #1291
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
Conversation
4f0303a
to
046037e
Compare
Just saw there is one small bug, will fix it |
Can you expand on this more? It sounds nice, I'd prefer the simpler solution where possible. |
Which definitely simplifies the code, but it adds ~15-20ms to the view (which could be fine for a view that isn't used that much) |
@jyn514 I just did the simplifying change as I would see it. If that's not what we want, I can just revert the commit. |
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.
This looks really good. I like calculating the info on demand instead of having the cronjob.
Co-authored-by: Joshua Nelson <[email protected]>
@jyn514 I changed it to using the int-cast, also I extended the test a little. |
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.
This is great! Thank you!
rust-lang#1291 removed this command, so starting the docker image fails
the previous solution in
update_release_activity
used 60 separate queries.We can easily replace this with a materialized view while also extending the range to all of history (refreshing the view takes ~200ms currently). This would enable us also to extend the time being shown, if we wanted to.
Another alternative approach could be to drop the background job completely (simplifying is always nice), and use a simple query with GROUP.
This would runs in ~15ms (compared to the <1ms for the query based on the materialized view).
When there is a decision on which way to go I would also add some more tests.