-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Allow calling cron jobs background job class with occ #30359
Conversation
Might be something related to #29204 to have also an occ command to run individual job classes in addition to the list. This would be similar to how Laravel handles queues https://laravel.com/docs/8.x/queues some further things to think about:
|
This can also help in this cases: #30273 |
we already have background-job:execute but I heard it doesn't work for all types and requires a job id, not a class name |
Sounds like a good idea to rather implement it as an occ which people could still setup as a cron job then. |
f4735c9
to
fa4a716
Compare
fa4a716
to
d6a4f4f
Compare
core/Command/Background/Worker.php
Outdated
if ((int)$row['count'] === 1) { | ||
$count++; | ||
} else { |
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.
What does this do?
5b84f7a
to
4c3e83f
Compare
4c3e83f
to
4fafa7e
Compare
f24e031
to
7f39075
Compare
Still stale @julien-nc ? |
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
…ss in cron.php and the job worker occ command Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
…und-job:worker for the job class list Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
7f39075
to
0eb4cdd
Compare
Thanks @marcelklehr and @julien-nc for picking this one up. 🚀 |
* @return list<array{class:class-string, count:int}> | ||
* @since 30.0.0 | ||
*/ | ||
public function countByClass(): array; |
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.
This would allow important jobs to be handled in a separate cronjob execution, so they can get executed, even if other jobs have lined up before
e.g. have a separate cron job with
php occ background-job:worker OCA\\Files\\BackgroundJob\\ScanFiles