summaryrefslogtreecommitdiffstats
path: root/lib/Cron
diff options
context:
space:
mode:
authorBenjamin Brahmer <info@b-brahmer.de>2020-05-23 21:27:34 +0200
committerBenjamin Brahmer <info@b-brahmer.de>2020-08-14 18:22:57 +0200
commit4ebc906fef787996497dc198e536e152e8be9bde (patch)
tree06fe6f4696c5b9af68f623a8a63231748daa7dbb /lib/Cron
parent1619dd379d79482e58696eea6c4fea7a03f9e65f (diff)
Update to new BackgroudJob logic
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
Diffstat (limited to 'lib/Cron')
-rw-r--r--lib/Cron/Updater.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Cron/Updater.php b/lib/Cron/Updater.php
index 55afe0a38..66ca4a908 100644
--- a/lib/Cron/Updater.php
+++ b/lib/Cron/Updater.php
@@ -11,13 +11,13 @@
namespace OCA\News\Cron;
-use OC\BackgroundJob\Job;
+use OC\BackgroundJob\TimedJob;
use OCA\News\Config\Config;
use OCA\News\Service\StatusService;
use OCA\News\Utility\Updater as UpdaterService;
-class Updater extends Job
+class Updater extends TimedJob
{
/**
@@ -34,6 +34,7 @@ class Updater extends Job
private $updaterService;
public function __construct(
+ ITimeFactroy $time,
Config $config,
StatusService $status,
UpdaterService $updaterService
@@ -41,6 +42,8 @@ class Updater extends Job
$this->config = $config;
$this->status = $status;
$this->updaterService = $updaterService;
+
+ parent::setInterval($this->config->getupdateInterval());
}
protected function run($argument)