From 47361fdc55cddd2f4a2cadbc1f55e20efc0f7e17 Mon Sep 17 00:00:00 2001 From: Hamid Dehnavi Date: Thu, 6 Jul 2023 11:23:28 +0330 Subject: Refactor core/BackgroundJobs Signed-off-by: Hamid Dehnavi --- core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php | 2 +- core/BackgroundJobs/LookupServerSendCheckBackgroundJob.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php b/core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php index e9096c99b44..b0acd89910c 100644 --- a/core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php +++ b/core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php @@ -43,7 +43,7 @@ class BackgroundCleanupUpdaterBackupsJob extends QueuedJob { /** * This job cleans up all backups except the latest 3 from the updaters backup directory */ - public function run($arguments) { + public function run($arguments): void { $updateDir = $this->config->getSystemValue('updatedirectory', null) ?? $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data'); $instanceId = $this->config->getSystemValue('instanceid', null); diff --git a/core/BackgroundJobs/LookupServerSendCheckBackgroundJob.php b/core/BackgroundJobs/LookupServerSendCheckBackgroundJob.php index decfbc08ea2..7562436d6f2 100644 --- a/core/BackgroundJobs/LookupServerSendCheckBackgroundJob.php +++ b/core/BackgroundJobs/LookupServerSendCheckBackgroundJob.php @@ -40,7 +40,7 @@ class LookupServerSendCheckBackgroundJob extends QueuedJob { parent::__construct($time); } - public function run($arguments) { + public function run($arguments): void { $this->userManager->callForSeenUsers(function (IUser $user) { $this->config->setUserValue($user->getUID(), 'lookup_server_connector', 'dataSend', '1'); }); -- cgit v1.2.3 From 246218d07a31ac0b8479fac68ca5afa1004d0994 Mon Sep 17 00:00:00 2001 From: Hamid Dehnavi Date: Thu, 6 Jul 2023 12:39:41 +0330 Subject: Make adjustments based on the review Signed-off-by: Hamid Dehnavi --- core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php | 4 +++- core/BackgroundJobs/LookupServerSendCheckBackgroundJob.php | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php b/core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php index b0acd89910c..e90cb73eb42 100644 --- a/core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php +++ b/core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php @@ -42,8 +42,10 @@ class BackgroundCleanupUpdaterBackupsJob extends QueuedJob { /** * This job cleans up all backups except the latest 3 from the updaters backup directory + * + * @param array $argument */ - public function run($arguments): void { + public function run($argument): void { $updateDir = $this->config->getSystemValue('updatedirectory', null) ?? $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data'); $instanceId = $this->config->getSystemValue('instanceid', null); diff --git a/core/BackgroundJobs/LookupServerSendCheckBackgroundJob.php b/core/BackgroundJobs/LookupServerSendCheckBackgroundJob.php index 7562436d6f2..921f34f5746 100644 --- a/core/BackgroundJobs/LookupServerSendCheckBackgroundJob.php +++ b/core/BackgroundJobs/LookupServerSendCheckBackgroundJob.php @@ -40,7 +40,10 @@ class LookupServerSendCheckBackgroundJob extends QueuedJob { parent::__construct($time); } - public function run($arguments): void { + /** + * @param array $argument + */ + public function run($argument): void { $this->userManager->callForSeenUsers(function (IUser $user) { $this->config->setUserValue($user->getUID(), 'lookup_server_connector', 'dataSend', '1'); }); -- cgit v1.2.3