diff options
Diffstat (limited to 'apps/files/lib/BackgroundJob/CleanupFileLocks.php')
-rw-r--r-- | apps/files/lib/BackgroundJob/CleanupFileLocks.php | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/apps/files/lib/BackgroundJob/CleanupFileLocks.php b/apps/files/lib/BackgroundJob/CleanupFileLocks.php index 69efb664302..91bb145884b 100644 --- a/apps/files/lib/BackgroundJob/CleanupFileLocks.php +++ b/apps/files/lib/BackgroundJob/CleanupFileLocks.php @@ -10,25 +10,19 @@ namespace OCA\Files\BackgroundJob; use OC\Lock\DBLockingProvider; use OCP\AppFramework\Utility\ITimeFactory; use OCP\BackgroundJob\TimedJob; +use OCP\Lock\ILockingProvider; +use OCP\Server; /** * Clean up all file locks that are expired for the DB file locking provider */ class CleanupFileLocks extends TimedJob { /** - * Default interval in minutes - * - * @var int $defaultIntervalMin - **/ - protected $defaultIntervalMin = 5; - - /** * sets the correct interval for this timed job */ public function __construct(ITimeFactory $time) { parent::__construct($time); - - $this->interval = $this->defaultIntervalMin * 60; + $this->setInterval(5 * 60); } /** @@ -38,7 +32,7 @@ class CleanupFileLocks extends TimedJob { * @throws \Exception */ public function run($argument) { - $lockingProvider = \OC::$server->getLockingProvider(); + $lockingProvider = Server::get(ILockingProvider::class); if ($lockingProvider instanceof DBLockingProvider) { $lockingProvider->cleanExpiredLocks(); } |