1234567891011121314151617181920212223242526272829303132333435363738 |
- <?php
- namespace OCA\Files\BackgroundJob;
- use OC\Lock\DBLockingProvider;
- use OCP\AppFramework\Utility\ITimeFactory;
- use OCP\BackgroundJob\TimedJob;
- class CleanupFileLocks extends TimedJob {
-
- public function __construct(ITimeFactory $time) {
- parent::__construct($time);
- $this->setInterval(5 * 60);
- }
-
- public function run($argument) {
- $lockingProvider = \OC::$server->getLockingProvider();
- if ($lockingProvider instanceof DBLockingProvider) {
- $lockingProvider->cleanExpiredLocks();
- }
- }
- }
|