summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJob.php
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2022-02-22 11:24:38 +0100
committerChristoph Wurst <christoph@winzerhof-wurst.at>2022-02-22 13:55:06 +0100
commitc01eb0775648bd54e9cd4904499a30f448554968 (patch)
treec06b619b4af515e48db263af4d82cee18473ba31 /apps/dav/lib/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJob.php
parenta6bc871c96d071ef54d9fd3b547df606fa9d19ca (diff)
downloadnextcloud-server-c01eb0775648bd54e9cd4904499a30f448554968.tar.gz
nextcloud-server-c01eb0775648bd54e9cd4904499a30f448554968.zip
Mark DAV background jobs as time sensitive/insensitive
* As a bonus they are now all using OCP base classes * Strict typing is now enforced Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/dav/lib/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJob.php')
-rw-r--r--apps/dav/lib/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJob.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/apps/dav/lib/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJob.php b/apps/dav/lib/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJob.php
index 9b3aeac5904..f7addd58248 100644
--- a/apps/dav/lib/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJob.php
+++ b/apps/dav/lib/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJob.php
@@ -28,8 +28,9 @@ declare(strict_types=1);
namespace OCA\DAV\BackgroundJob;
-use OC\BackgroundJob\TimedJob;
use OCA\DAV\CalDAV\CalDavBackend;
+use OCP\AppFramework\Utility\ITimeFactory;
+use OCP\BackgroundJob\TimedJob;
use OCP\Calendar\BackendTemporarilyUnavailableException;
use OCP\Calendar\IMetadataProvider;
use OCP\Calendar\Resource\IBackend as IResourceBackend;
@@ -53,17 +54,20 @@ class UpdateCalendarResourcesRoomsBackgroundJob extends TimedJob {
/** @var CalDavBackend */
private $calDavBackend;
- public function __construct(IResourceManager $resourceManager,
+ public function __construct(ITimeFactory $time,
+ IResourceManager $resourceManager,
IRoomManager $roomManager,
IDBConnection $dbConnection,
CalDavBackend $calDavBackend) {
+ parent::__construct($time);
$this->resourceManager = $resourceManager;
$this->roomManager = $roomManager;
$this->dbConnection = $dbConnection;
$this->calDavBackend = $calDavBackend;
- // run once an hour
+ // Run once an hour
$this->setInterval(60 * 60);
+ $this->setTimeSensitivity(self::TIME_SENSITIVE);
}
/**