summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib/DeleteOrphanedSharesJob.php
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/DeleteOrphanedSharesJob.php
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/DeleteOrphanedSharesJob.php')
-rw-r--r--apps/files_sharing/lib/DeleteOrphanedSharesJob.php8
1 files changed, 5 insertions, 3 deletions
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;
}