From d4f96b7ef003c4376f0406d9090438c11b51cfc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Mon, 17 Jun 2019 23:27:35 +0200 Subject: Use constant for timed job MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/Cron/Cleanup.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/Cron/Cleanup.php b/lib/Cron/Cleanup.php index e32118388..1d40d322e 100644 --- a/lib/Cron/Cleanup.php +++ b/lib/Cron/Cleanup.php @@ -27,13 +27,12 @@ declare(strict_types=1); namespace OCA\Text\Cron; -use OC\BackgroundJob\TimedJob; use OCA\Text\Db\Session; use OCA\Text\DocumentHasUnsavedChangesException; use OCA\Text\Service\DocumentService; use OCA\Text\Service\SessionService; use OCP\AppFramework\Utility\ITimeFactory; -use OCP\BackgroundJob\Job; +use OCP\BackgroundJob\TimedJob; use OCP\ILogger; /** @@ -53,7 +52,7 @@ class Cleanup extends TimedJob { $this->sessionService = $sessionService; $this->documentService = $documentService; $this->logger = $logger; - $this->setInterval(5 * 60); + $this->setInterval(SessionService::SESSION_VALID_TIME); } protected function run($argument) { -- cgit v1.2.3