mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
fix: use interval value in JobWorker
Signed-off-by: Salvatore Martire <4652631+salmart-dev@users.noreply.github.com>
This commit is contained in:
parent
da76b7a100
commit
3abd852fca
1 changed files with 5 additions and 2 deletions
|
|
@ -50,7 +50,7 @@ class JobWorker extends JobBase {
|
|||
'i',
|
||||
InputOption::VALUE_OPTIONAL,
|
||||
'Interval in seconds in which the worker should repeat already processed jobs (set to 0 for no repeat)',
|
||||
5
|
||||
1
|
||||
)
|
||||
->addOption(
|
||||
'stop_after',
|
||||
|
|
@ -114,8 +114,11 @@ class JobWorker extends JobBase {
|
|||
}
|
||||
|
||||
$output->writeln('Waiting for new jobs to be queued', OutputInterface::VERBOSITY_VERBOSE);
|
||||
if ((int)$input->getOption('interval') === 0) {
|
||||
break;
|
||||
}
|
||||
// Re-check interval for new jobs
|
||||
sleep(1);
|
||||
sleep((int)$input->getOption('interval'));
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue