diff options
author | Côme Chilliet <91878298+come-nc@users.noreply.github.com> | 2022-12-06 12:14:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-06 12:14:43 +0100 |
commit | 1821712615cc4adc4a600ad8a86c4d68764bd3a6 (patch) | |
tree | 15fdb1f2754ac79fb779ad94d7117c9272e9df78 /apps/files_sharing/lib | |
parent | 48358bb78f5955e982bcd07e7db252ad0ae43819 (diff) | |
parent | 72c7fad1c4997f7dd386f2476a084dcbbcc665a9 (diff) | |
download | nextcloud-server-1821712615cc4adc4a600ad8a86c4d68764bd3a6.tar.gz nextcloud-server-1821712615cc4adc4a600ad8a86c4d68764bd3a6.zip |
Merge pull request #35596 from nextcloud/fix/move-to-ocp-timedjob
Use TimedJob from OCP instead of OC
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r-- | apps/files_sharing/lib/BackgroundJob/FederatedSharesDiscoverJob.php | 7 | ||||
-rw-r--r-- | apps/files_sharing/lib/DeleteOrphanedSharesJob.php | 8 |
2 files changed, 10 insertions, 5 deletions
diff --git a/apps/files_sharing/lib/BackgroundJob/FederatedSharesDiscoverJob.php b/apps/files_sharing/lib/BackgroundJob/FederatedSharesDiscoverJob.php index d35f35d20f2..687dcd25f8b 100644 --- a/apps/files_sharing/lib/BackgroundJob/FederatedSharesDiscoverJob.php +++ b/apps/files_sharing/lib/BackgroundJob/FederatedSharesDiscoverJob.php @@ -26,7 +26,8 @@ declare(strict_types=1); */ namespace OCA\Files_Sharing\BackgroundJob; -use OC\BackgroundJob\TimedJob; +use OCP\AppFramework\Utility\ITimeFactory; +use OCP\BackgroundJob\TimedJob; use OCP\IDBConnection; use OCP\OCS\IDiscoveryService; @@ -36,8 +37,10 @@ class FederatedSharesDiscoverJob extends TimedJob { /** @var IDiscoveryService */ private $discoveryService; - public function __construct(IDBConnection $connection, + public function __construct(ITimeFactory $time, + IDBConnection $connection, IDiscoveryService $discoveryService) { + parent::__construct($time); $this->connection = $connection; $this->discoveryService = $discoveryService; diff --git a/apps/files_sharing/lib/DeleteOrphanedSharesJob.php b/apps/files_sharing/lib/DeleteOrphanedSharesJob.php index 6a641734680..d2cc39ff060 100644 --- a/apps/files_sharing/lib/DeleteOrphanedSharesJob.php +++ b/apps/files_sharing/lib/DeleteOrphanedSharesJob.php @@ -24,13 +24,13 @@ */ namespace OCA\Files_Sharing; -use OC\BackgroundJob\TimedJob; +use OCP\AppFramework\Utility\ITimeFactory; +use OCP\BackgroundJob\TimedJob; /** * Delete all share entries that have no matching entries in the file cache table. */ class DeleteOrphanedSharesJob extends TimedJob { - /** * Default interval in minutes * @@ -41,7 +41,9 @@ class DeleteOrphanedSharesJob extends TimedJob { /** * sets the correct interval for this timed job */ - public function __construct() { + public function __construct(ITimeFactory $time) { + parent::__construct($time); + $this->interval = $this->defaultIntervalMin * 60; } |