Skip to content

Commit d5991fc

Browse files
committed
fixup! Only retry fetching app store data once every 5 minutes in case it fails
1 parent 9e94896 commit d5991fc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/private/App/AppStore/Fetcher/Fetcher.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public function __construct(Factory $appDataFactory,
9292
*/
9393
protected function fetch($ETag, $content) {
9494
$appstoreenabled = $this->config->getSystemValue('appstoreenabled', true);
95-
if ((int)$this->config->getAppValue('settings', 'appstore-fetcher-lastFailure', 0) > time() - self::RETRY_AFTER_FAILURE_SECONDS) {
95+
if ((int)$this->config->getAppValue('settings', 'appstore-fetcher-lastFailure', '0') > time() - self::RETRY_AFTER_FAILURE_SECONDS) {
9696
return [];
9797
}
9898

@@ -114,7 +114,7 @@ protected function fetch($ETag, $content) {
114114
try {
115115
$response = $client->get($this->getEndpoint(), $options);
116116
} catch (ConnectException $e) {
117-
$this->config->setAppValue('settings', 'appstore-fetcher-lastFailure', time());
117+
$this->config->setAppValue('settings', 'appstore-fetcher-lastFailure', (string)time());
118118
throw $e;
119119
}
120120

0 commit comments

Comments
 (0)