-
Notifications
You must be signed in to change notification settings - Fork 2.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
Adding background:queue commands: status and delete #31630
Conversation
@@ -0,0 +1,45 @@ | |||
<?php | |||
|
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.
missing copyright header
$job = $this->jobList->getById($id); | ||
if ($job === null) { | ||
$output->writeln("Job with id <$id> is not known."); | ||
return; |
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.
return 1 for the error?
} | ||
|
||
$this->jobList->removeById($id); | ||
$output->writeln('Job has been deleted.'); |
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.
return 0
* iterate over all jobs in the queue | ||
* | ||
* @return void | ||
* @since 10.0.3 |
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.
10.0.9?
d8f890e
to
d11d73e
Compare
Codecov Report
@@ Coverage Diff @@
## master #31630 +/- ##
============================================
+ Coverage 62.88% 62.88% +<.01%
- Complexity 18381 18393 +12
============================================
Files 1151 1153 +2
Lines 69111 69151 +40
Branches 1260 1260
============================================
+ Hits 43457 43485 +28
- Misses 25285 25297 +12
Partials 369 369
Continue to review full report at Codecov.
|
For the sake of documentation 😄
|
@DeepDiver1975 in command status, you have @tomneedham you have in #31617 in code @DeepDiver1975 , same codline as above in Edited, falsly used @butonic instead of @tomneedham , pls excuse |
@DeepDiver1975 |
I see no inconsistency here - id in the argument follows the command argument naming convention and the Id in the status command is a human readable table column - all columns are upper case.
agreed
job arguments hold the class name as well as required arguments for the execution of the job. the information is identical but it's represenations is different - I see no way to harmonize this right away
well - this is what backups are for ;-) reset is not the way to go because there are multiple sources how jobs are enqueued - we can only restore some of them. I dislike partial solutions |
d11d73e
to
c8971ee
Compare
@DeepDiver1975 @tomneedham All three lines are printed and the user can see it.
Could we agree to have the same naming in all PR´s for this too, like
I would not sign this... I do not know, but a possible solution could be to have a marker in the database for jobs defined by core and you can enable/disable them. All other jobs not beeing part of core do not get/have that marker.
Agreed - therefore I take the effort to write my thoughts down 😄 |
I agree to use the same argument name here. |
Status and delete are useful commands, but only for debugging / analysis, not normal operation. This should be clear in any documentation. Likewise with my execute command, it is only really for use in exceptional scenarios where we need to forcefully trigger a job on demand for analysis. It should not be expected that these commands are used in normal operation. |
c8971ee
to
1a99e5d
Compare
addressed |
@DeepDiver1975 (all changes including the proposal below need table length adoption ...) @tomneedham I do not know where the right place to note that is so I do here, Looking at both PR´s I see that |
@mmattel thx, known - waiting for this then I will rebase based on feedback here |
we can harmonize print out later on ... |
@tomneedham feel free to adjust your PR - THX |
@DeepDiver1975 backport to stable10 ? |
we will backport once #31617 is merged and we backport this together as one |
Backport |
some objections to be clarified in #31617 first cc @tomneedham |
I added label only-in-master so I can find and recognise this PR easily.
|
Ping @tomneedham or anyone for comment about backporting. |
Description
Adding two new commands for listing background jobs and deleting individual jobs
Related Issue
#31617
Motivation and Context
Adding a full feature set around occ and background jobs
How Has This Been Tested?
Types of changes
Checklist: