-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Remove unused interval option from occ background-job:worker
#53414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
83ada4d
to
1086aa2
Compare
occ background-job:worker
/backport to stable31 |
/backport to stable30 |
1013a8c
to
8bebe19
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Breaking change
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
8bebe19
to
82027f4
Compare
Signed-off-by: Salvatore Martire <[email protected]>
Signed-off-by: Salvatore Martire <[email protected]>
82027f4
to
0b390e3
Compare
@@ -115,10 +115,11 @@ protected function execute(InputInterface $input, OutputInterface $output): int | |||
|
|||
$output->writeln('Waiting for new jobs to be queued', OutputInterface::VERBOSITY_VERBOSE); | |||
// Re-check interval for new jobs | |||
sleep(1); | |||
sleep($input->getOption('interval')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sleep($input->getOption('interval')); | |
if ((int)$input->getOption('interval') === 0) { | |
break; | |
} | |
sleep((int)$input->getOption('interval')); |
@@ -49,8 +49,8 @@ protected function configure(): void { | |||
'interval', | |||
'i', | |||
InputOption::VALUE_OPTIONAL, | |||
'Interval in seconds in which the worker should repeat already processed jobs (set to 0 for no repeat)', | |||
5 | |||
'Interval in seconds in which the worker should repeat already processed jobs', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'Interval in seconds in which the worker should repeat already processed jobs', | |
'Interval in seconds in which the worker should repeat already processed jobs (set to 0 for no repeat)', |
continue; | ||
} | ||
|
||
$output->writeln('<comment>Job ' . $job::class . ' is a TimedJob, this command is designed to run QueuedJob.</comment>'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$output->writeln('<comment>Job ' . $job::class . ' is a TimedJob, this command is designed to run QueuedJob.</comment>'); |
wrong place and unrelated?
Summary
Context
This PR comes from an investigation done for issue #49584
The user reported that running
occ background-job:worker --interval 5
does not run jobs every 5 seconds as advertised.Upon investigation, I found out that the implementation for the
--interval
option was never merged and the option seems to be a leftover from the PR where background workers were introduced.This PR removes the
--interval
option fromocc background-job:worker
to avoid confusion.Checklist