Commit Graph

46 Commits (master)

Author SHA1 Message Date
Andy Scherzinger 5c49a54801
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
7 days ago
Andy Scherzinger 1df96b0417
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
3 weeks ago
Julien Veyssier 0eb4cddc54
feat(bg-jobs): support multiple arguments in cron.php and occ:background-job:worker for the job class list
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
1 month ago
Julien Veyssier d967151f52
fix(bg-jobs): review adjustments
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
1 month ago
Julien Veyssier 1acc57b5c0
feat(bg-jobs): allow setting a job class list instead of a single class in cron.php and the job worker occ command
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
1 month ago
Julien Veyssier a5f244a58b
chore(bg-jobs): more output in verbose mode in the bg job worker
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
1 month ago
Marcel Klehr 9a3b341932
fix(bg-jobs): cs:fix
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
1 month ago
Marcel Klehr 352d79deee
fix(bg-jobs): fix psalm issues
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
1 month ago
Marcel Klehr 993398b88a
fix(bg-jobs): Remove interval bookkeeping
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
1 month ago
Marcel Klehr a3d8632fbe
fix(bg-jobs): fix minor issues
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
1 month ago
Julius Härtl d69b8ecf95
fix(bg-jobs): Fix running once when no job was scheduled
Signed-off-by: Julius Härtl <jus@bitgrid.net>
1 month ago
Julius Härtl 8400bfee01
feat(bg-jobs): Add background worker occ command
Signed-off-by: Julius Härtl <jus@bitgrid.net>
1 month ago
Côme Chilliet 65bad47e7e
fix: Suppress psalm errors about deprecated execute method, we have to use it for now
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
3 months ago
Côme Chilliet 75751d51de
fix: Call execute until it is removed for Job class
Because if an application extends execute it will change behavior
 without warning otherwise.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
3 months ago
Hamid Dehnavi 706231438e Make adjustments based on the review
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
Co-authored-by: Christoph Wurst <christoph@winzerhof-wurst.at>
3 months ago
Hamid Dehnavi 5c64528336 Make adjustments based on the review
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
Co-authored-by: Christoph Wurst <christoph@winzerhof-wurst.at>
3 months ago
Hamid Dehnavi 7dc304db02 Refactor core/Command/Background
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
3 months ago
Côme Chilliet 303e2febc7
Merge pull request #43387 from nextcloud/fix/migrate-away-from-ilogger-in-jobs 4 months ago
Louis Chemineau 898df41de9
Revert "Merge branch 'master' of github.com:nextcloud/server"
This reverts commit d9d60238c7, reversing
changes made to ba3fdb0cdc.
4 months ago
Côme Chilliet e78e27187a chore: Delete deprecated internal Job classes
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
4 months ago
Côme Chilliet 166773879b fix!: Migrate jobs away from deprecated interfaces
BREAKING CHANGE: Removed ILogFactory::getCustomLogger deprecated method

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
4 months ago
Maxence Lange bd3df759fb occ background-job:delete
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
5 months ago
Jonas af4287d8a3 Update core/Command/Background/ListCommand.php
Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: Jonas <jonas@freesources.org>
7 months ago
Jonas 490f5cc4ec fix(Background): Bump default limit for listing background jobs to 500
Signed-off-by: Jonas <jonas@freesources.org>
7 months ago
Jonas 9fbe68ab36 fix(Background): Show comment about limit at end and conditionally
* Only print the comment when job list is truncated
* Show the comment at the end so users actually see it
* Format the comment as comment

Signed-off-by: Jonas <jonas@freesources.org>
7 months ago
Jonas deb4bb8d4e Update core/Command/Background/ListCommand.php
Co-authored-by: Daniel <mail@danielkesselberg.de>
Signed-off-by: Jonas <jonas@freesources.org>
7 months ago
Josh Richards bb75dab93a (enh) Change occ background-job:list limit default 10->100
The default limit of 10 seems too conservative. Nearly all environments >100 and most <10. At the same time, this higher default limit still remains reasonable to avoid problems in really big environments.

Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
7 months ago
Faraz Samapoor cda0f74e0b Moves single constructor parameters to new lines.
Based on:
https://github.com/nextcloud/server/pull/38764#discussion_r1227630895

Signed-off-by: Faraz Samapoor <fsa@adlas.at>
12 months ago
Faraz Samapoor ea844ca5fb Uses PHP8's constructor property promotion.
in core/Command/App, /Background, and /Broadcast classes.

Signed-off-by: Faraz Samapoor <fsa@adlas.at>
12 months ago
Côme Chilliet d74044f634
Fix API breakage by using a new method instead
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 year ago
Côme Chilliet 679682c186
Use a Generator for job list to fix background-job:list command
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 year ago
Côme Chilliet cc89da26c6 Fix background-job:execute command for QueuedJob instances
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2 years ago
Côme Chilliet 3920fc1ef2 Format the datetime for last run in ATOM format
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2 years ago
Côme Chilliet 0cc39d185c Use symfony console table to render the job list properly
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2 years ago
Côme Chilliet 868d748dbf Code cleaning of Background/ListCommand
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2 years ago
Côme Chilliet 3d01179907 Add command to list jobs
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2 years ago
Carl Schwan b70c6a128f Update core to PHP 7.4 standard
- Typed properties
- Port to LoggerInterface

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2 years ago
Joas Schilling 0a812a1c09
Adjust namespace and print a message when the job was skipped
Signed-off-by: Joas Schilling <coding@schilljs.com>
3 years ago
Joas Schilling 9cd9f4b4bc
Move queries to the joblist
Signed-off-by: Joas Schilling <coding@schilljs.com>
3 years ago
Joas Schilling e2a7482b49
Add a command to show info about a background job and force-execute it
Signed-off-by: Joas Schilling <coding@schilljs.com>
3 years ago
Joas Schilling ab21d69903
Add return value to all commands
Signed-off-by: Joas Schilling <coding@schilljs.com>
4 years ago
Christoph Wurst caff1023ea
Format control structures, classes, methods and function
To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.

This also removes and empty lines from method/function bodies at the
beginning and end.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst 44577e4345
Remove trailing and in between spaces
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst 85e369cddb
Fix multiline comments
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Roeland Jago Douma 68748d4f85
Some php-cs fixes
* Order the imports
* No leading slash on imports
* Empty line before namespace
* One line per import
* Empty after imports
* Emmpty line at bottom of file

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
5 years ago
Lukas Reschke a4b19a5b1e
Rename files to be PSR-4 compliant 8 years ago