mirror of
https://github.com/nextcloud/server.git
synced 2026-04-21 14:23:17 -04:00
chore(bg-jobs): more output in verbose mode in the bg job worker
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
This commit is contained in:
parent
9814bffb77
commit
a5f244a58b
1 changed files with 7 additions and 3 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue