- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 4.6k
Only retry fetching app store data once every 5 minutes in case it fails #23374
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
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.
Makes sense 👍
| I'm not a fan ;) Most people still have a old version around. I would suggest to return the old version and queue a background job to update the apps.json. Anything else is just ducktaping ;) But yes this one is easy to backport. | 
| if (empty($responseJson['data'])) { | ||
| return []; | ||
| } | 
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.
Throw a ConnectException in the fetch instead?
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.
I'm not sure if there might be cases where an empty response would be valid in case there are no releases for the Nextcloud version for example, so I'd rather keep the logic for now.
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.
In any case this should be a different exception then, since there is no connection happening. Also logging this every time should then only be done on debug/info level I guess. But for the sake of backporting I'd keep the changes minimal for now.
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.
Like the general idea, not sure if we should save it in the cache (most 1-user instances might not have one and therefor still cause the most issues).
Maybe we store it either in the file or the appconfig instead?
| 
 Yeah, makes sense. I'll adjust that. | 
ca3cb7f    to
    9e94896      
    Compare
  
    Signed-off-by: Julius Härtl <jus@bitgrid.net>
d5991fc    to
    4512c73      
    Compare
  
    | /backport to stable20 | 
| /backport to stable19 | 
| /backport to stable18 | 
Reduce the amount of requests going to the app store in case that it is slow anyways