-
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
Add background:execute occ command for running cron jobs manually #31617
Conversation
Moved over the ConsoleLogger which is a useful utility to create an |
Open questions - should we respect the |
The command is part of core so we could pull
|
This is documentation relevant ! |
Codecov Report
@@ Coverage Diff @@
## master #31617 +/- ##
============================================
- Coverage 65.37% 65.35% -0.02%
- Complexity 18588 18617 +29
============================================
Files 1213 1215 +2
Lines 70380 70487 +107
Branches 1295 1295
============================================
+ Hits 46009 46065 +56
- Misses 23997 24048 +51
Partials 374 374
Continue to review full report at Codecov.
|
Why not using a |
Pushed a fix to add the time to the log messages in the console |
are you aware of https://github.com/owncloud/core/pull/24551/files - let's sync the command names |
#24551 adds a status command for this |
@tomneedham pls see my comment in #31630 (comment) |
d90df44
to
3f7a790
Compare
Question: at the code locations for Is this by intention ? |
in debug mode I would rather be more explicit, and that variable is the class name |
as discussed, @jvillafanez will help out. thx |
Except for #31617 (comment) which can't be solved without heavy changes, the rest of the problems have been addressed. |
d63d0d8
to
ca22476
Compare
The reviewer himself has adjusted the code.
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.
LGTM. Test cases cover the various combiations of ways to use the execute command.
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.
👍
@PVince81 please decide if the codecov here is enough. |
I think we can remove the ConsoleLogger and inject a normal one (the one provided by the server) in the execute command. Unless we need the ConsoleLogger for something in particular, I think this should rise the coverage for the patch (less untested code) |
@jvillafanez can you make the proposed change ? |
ok let's keep the console logger for now, there must have been a reason for adding it... |
Questions:
Both related to documentaion, see owncloud/docs#290 |
I am waiting for #34723 backport to be merged. Then I will make a backport of this. It goes with the other new |
Backport |
The doc PR is made. While writing it, I remembered: #31743 (Adding command background:queue:add) We can now delete a job (yes we ask if we really want to do so) but nontheless an add command is missing... There are for sure default jobs which are part of the tar shipment. A list could be created and documented in the occ command set to reuse/reference... |
Description
Added
occ:background:execute {id} -f
OCC command.Motivation and Context
Debugging cron jobs is really tricky, often involes touching oc_jobs and triggering cron.php yourself.
This can be used to run the jobs manually, view more debug output from the command, and force running even when the interval has not passed.
How Has This Been Tested?
Manually, testing out the Activity EmailNotification background job.
Screenshots (if appropriate):
Types of changes
Checklist: