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

Update feed only if nextUpdateTime has been reached #2999

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

Grotax
Copy link
Member

@Grotax Grotax commented Dec 22, 2024

Summary

This changes the logic of updating/fetching a feed to check for the nextUpdateTime before the the update is executed.

If that time is not reached yet the feed is not updated. This is mainly a advantage for feeds that are updated rarely and will therefore receive less requests. For the nextcloud instance this is also a benefit because feed updates that are likely not needed are skipped, which saves compute time.

Depends on #2993

Checklist

@Grotax Grotax marked this pull request as draft December 22, 2024 11:03
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
@Grotax Grotax changed the title Updater/newlogic Update feed only if nextUpdateTime has been reached Dec 23, 2024
@Grotax
Copy link
Member Author

Grotax commented Dec 23, 2024

I'm currently struggling a bit with this for multiple reasons.

  1. In my dev environment nextUpdateTime in the DB ends up being Null for some reason for some feeds while in the debug log I see that the nextUpdateTime was logged
  2. Also in the Updater test that I added the field of that feed is null after adding it which i expected but then it stays null after running an update it should no longer be null
  3. If it was working I'm not sure how to test the update behavior since the date would be in one hour, because feed-io sets that as by default as the smallest nextUpdateTime which i think makes sense for real world. But for most of the updater tests that would mean they break.

Anyway can someone tell me why the field can end up being null?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant