Browse Source

Merge pull request #49396 from nextcloud/dav-webcal-default-refresh-rate

feat(dav): increase default calendar subscription refresh rate to one day
Christoph Wurst 23 hours ago
parent
commit
cbb937fa32

+ 2 - 2
apps/dav/lib/BackgroundJob/RefreshWebcalJob.php

@@ -41,8 +41,8 @@ class RefreshWebcalJob extends Job {
 
 		$this->fixSubscriptionRowTyping($subscription);
 
-		// if no refresh rate was configured, just refresh once a week
-		$defaultRefreshRate = $this->config->getAppValue('dav', 'calendarSubscriptionRefreshRate', 'P1W');
+		// if no refresh rate was configured, just refresh once a day
+		$defaultRefreshRate = $this->config->getAppValue('dav', 'calendarSubscriptionRefreshRate', 'P1D');
 		$refreshRate = $subscription[RefreshWebcalService::REFRESH_RATE] ?? $defaultRefreshRate;
 
 		$subscriptionId = $subscription['id'];

+ 1 - 1
apps/dav/tests/unit/BackgroundJob/RefreshWebcalJobTest.php

@@ -78,7 +78,7 @@ class RefreshWebcalJobTest extends TestCase {
 
 		$this->config->expects($this->once())
 			->method('getAppValue')
-			->with('dav', 'calendarSubscriptionRefreshRate', 'P1W')
+			->with('dav', 'calendarSubscriptionRefreshRate', 'P1D')
 			->willReturn('P1W');
 
 		$this->timeFactory->method('getTime')