diff options
author | Marcel Klehr <mklehr@gmx.net> | 2023-12-20 14:12:27 +0100 |
---|---|---|
committer | Julien Veyssier <julien-nc@posteo.net> | 2024-05-02 16:43:41 +0200 |
commit | a3d8632fbe5e255a30343c1950d9ec8a1849f5af (patch) | |
tree | 0bcdd22833b54b2501663f34bfd184fc46d7a80c /core | |
parent | d69b8ecf953f752efae3bb1b4f1ff3034d5cdcb9 (diff) | |
download | nextcloud-server-a3d8632fbe5e255a30343c1950d9ec8a1849f5af.tar.gz nextcloud-server-a3d8632fbe5e255a30343c1950d9ec8a1849f5af.zip |
fix(bg-jobs): fix minor issues
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Diffstat (limited to 'core')
-rw-r--r-- | core/Command/Background/JobWorker.php | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/core/Command/Background/JobWorker.php b/core/Command/Background/JobWorker.php index 2ca4af73474..c0122e84694 100644 --- a/core/Command/Background/JobWorker.php +++ b/core/Command/Background/JobWorker.php @@ -36,11 +36,6 @@ use Symfony\Component\Console\Output\OutputInterface; class JobWorker extends JobBase { private array $executedJobs = []; - public function __construct(IJobList $jobList, - LoggerInterface $logger) { - parent::__construct($jobList, $logger); - } - protected function configure(): void { parent::configure(); @@ -76,6 +71,8 @@ class JobWorker extends JobBase { return 1; } + $interval = (int)($input->getOption('interval') ?? 5); + while (true) { // Handle canceling of the process try { @@ -89,8 +86,6 @@ class JobWorker extends JobBase { $this->printSummary($input, $output); - $interval = (int)($input->getOption('interval') ?? 5); - // Unlock jobs that should be executed again after the interval // Alternative could be to set last_checked to interval in the future to avoid the extra locks foreach ($this->executedJobs as $id => $time) { |