diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-12-05 10:13:34 +0100 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-12-05 10:13:34 +0100 |
commit | a0f6a6545b59b1061e96e7d17d8ec6d6f32e615e (patch) | |
tree | b98e1679b900f1518acdcea69884c25f1cd0f962 /apps/admin_audit | |
parent | 944be7950a0199dbc48b99dac936987b13dd0383 (diff) | |
download | nextcloud-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/admin_audit')
-rw-r--r-- | apps/admin_audit/lib/BackgroundJobs/Rotate.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/apps/admin_audit/lib/BackgroundJobs/Rotate.php b/apps/admin_audit/lib/BackgroundJobs/Rotate.php index 27d5109fd3f..9526be6f7b1 100644 --- a/apps/admin_audit/lib/BackgroundJobs/Rotate.php +++ b/apps/admin_audit/lib/BackgroundJobs/Rotate.php @@ -27,7 +27,8 @@ declare(strict_types=1); */ namespace OCA\AdminAudit\BackgroundJobs; -use OC\BackgroundJob\TimedJob; +use OCP\BackgroundJob\TimedJob; +use OCP\AppFramework\Utility\ITimeFactory; use OCP\IConfig; use OCP\Log\RotationTrait; @@ -37,13 +38,16 @@ class Rotate extends TimedJob { /** @var IConfig */ private $config; - public function __construct(IConfig $config) { + public function __construct(ITimeFactory $time, + IConfig $config) { + parent::__construct($time); + $this->config = $config; $this->setInterval(60 * 60 * 3); } - protected function run($argument) { + protected function run($argument): void { $default = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data') . '/audit.log'; $this->filePath = $this->config->getAppValue('admin_audit', 'logfile', $default); |