-
Notifications
You must be signed in to change notification settings - Fork 190
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
Conversation
7dd001c
to
70178af
Compare
d115ee0
to
2d16949
Compare
I'm currently struggling a bit with this for multiple reasons.
Anyway can someone tell me why the field can end up being null? |
This comment was marked as outdated.
This comment was marked as outdated.
Found the issue who would have thought that the Feed-Service does not use the feed object of the fetcher but has it's own and you need to transfer the value :). Which makes me wonder why it worked sometimes. That must have been a different path in the code that causes the value to be passed through ... |
This comment was marked as outdated.
This comment was marked as outdated.
3bee890
to
5fa92b3
Compare
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
5fa92b3
to
f9bb13f
Compare
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.
All looks good to me, thanks for all the time you put into this!
Changed - API add new field to Feed that indicates when the next update will be done "nextUpdateTime" (#2993) - Change logic to update feed only if the nextUpdateTime has been reached (#2999) - Add setting to disable the usage of nextUpdateTime (#2999) Fixed - `TypeError: this.$refs.actions.$refs.menuButton is undefined` when tabbing through feeds and folders (#3004) Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
Changed - API add new field to Feed that indicates when the next update will be done "nextUpdateTime" (#2993) - Change logic to update feed only if the nextUpdateTime has been reached (#2999) - Add setting to disable the usage of nextUpdateTime (#2999) Fixed - `TypeError: this.$refs.actions.$refs.menuButton is undefined` when tabbing through feeds and folders (#3004) Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
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.
The default minimum for an active feed is "in 1 hour" which means it will be updated in hour again.
Also added a setting to disable this, mostly for testing but I can also imagine that in the beginning or for certain use cases people want to disable this.
Builds on top of #2993
Checklist