summaryrefslogtreecommitdiffstats
path: root/apps/admin_audit
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2022-12-05 10:13:34 +0100
committerCôme Chilliet <come.chilliet@nextcloud.com>2022-12-05 10:13:34 +0100
commita0f6a6545b59b1061e96e7d17d8ec6d6f32e615e (patch)
treeb98e1679b900f1518acdcea69884c25f1cd0f962 /apps/admin_audit
parent944be7950a0199dbc48b99dac936987b13dd0383 (diff)
downloadnextcloud-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.php10
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);