aboutsummaryrefslogtreecommitdiffstats
path: root/core/Command
diff options
context:
space:
mode:
authorJulien Veyssier <julien-nc@posteo.net>2024-04-08 13:21:32 +0200
committerJulien Veyssier <julien-nc@posteo.net>2024-05-02 16:43:41 +0200
commita5f244a58b6cfcc4feb8d8bdf33b40f983c342cb (patch)
treec25db61eba09a403d4bdb6a6c90c318ad3529d0e /core/Command
parent9814bffb7799cac8050c8c72b93fc90e7cac5e9a (diff)
downloadnextcloud-server-a5f244a58b6cfcc4feb8d8bdf33b40f983c342cb.tar.gz
nextcloud-server-a5f244a58b6cfcc4feb8d8bdf33b40f983c342cb.zip
chore(bg-jobs): more output in verbose mode in the bg job worker
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
Diffstat (limited to 'core/Command')
-rw-r--r--core/Command/Background/JobWorker.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/core/Command/Background/JobWorker.php b/core/Command/Background/JobWorker.php
index 995bb1a3fd7..d6aab0e83bc 100644
--- a/core/Command/Background/JobWorker.php
+++ b/core/Command/Background/JobWorker.php
@@ -83,16 +83,18 @@ class JobWorker extends JobBase {
$job = $this->jobList->getNext(false, $jobClass);
if (!$job) {
if ($input->getOption('once') === true) {
+ $output->writeln('No job of class ' . $jobClass . ' is currently queued', OutputInterface::VERBOSITY_VERBOSE);
+ $output->writeln('Exiting...', OutputInterface::VERBOSITY_VERBOSE);
break;
}
- $output->writeln("Waiting for new jobs to be queued", OutputInterface::VERBOSITY_VERBOSE);
+ $output->writeln('Waiting for new jobs to be queued', OutputInterface::VERBOSITY_VERBOSE);
// Re-check interval for new jobs
sleep(1);
continue;
}
- $output->writeln("Running job " . get_class($job) . " with ID " . $job->getId());
+ $output->writeln('Running job ' . get_class($job) . ' with ID ' . $job->getId());
if ($output->isVerbose()) {
$this->printJobInfo($job->getId(), $job, $output);
@@ -100,6 +102,8 @@ class JobWorker extends JobBase {
$job->start($this->jobList);
+ $output->writeln('Job ' . $job->getId() . ' has finished', OutputInterface::VERBOSITY_VERBOSE);
+
// clean up after unclean jobs
\OC_Util::tearDownFS();
\OC::$server->get(ITempManager::class)->clean();
@@ -119,7 +123,7 @@ class JobWorker extends JobBase {
if (!$output->isVeryVerbose()) {
return;
}
- $output->writeln("<comment>Summary</comment>");
+ $output->writeln('<comment>Summary</comment>');
$counts = [];
foreach ($this->jobList->countByClass() as $row) {