summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2022-12-05 10:13:34 +0100
committerCôme Chilliet <come.chilliet@nextcloud.com>2022-12-05 10:13:34 +0100
commita0f6a6545b59b1061e96e7d17d8ec6d6f32e615e (patch)
treeb98e1679b900f1518acdcea69884c25f1cd0f962 /apps/files_sharing/lib
parent944be7950a0199dbc48b99dac936987b13dd0383 (diff)
downloadnextcloud-server-a0f6a6545b59b1061e96e7d17d8ec6d6f32e615e.tar.gz
nextcloud-server-a0f6a6545b59b1061e96e7d17d8ec6d6f32e615e.zip
Use TimedJob from OCP instead of OC
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r--apps/files_sharing/lib/BackgroundJob/FederatedSharesDiscoverJob.php7
-rw-r--r--apps/files_sharing/lib/DeleteOrphanedSharesJob.php8
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;
}