aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/BackgroundJob
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-06-28 12:55:26 +0200
committerCarl Schwan <carl@carlschwan.eu>2022-08-08 17:03:19 +0200
commit48d9c4d2b093e12ec3bf3cd29295da0f2277028f (patch)
treed66f1d2f54e8ae745fc7ce7bf067ce2072eeac6a /lib/private/BackgroundJob
parent19a2d6f6e7d54eb9318279809bf6c3f40bf566e2 (diff)
downloadnextcloud-server-48d9c4d2b093e12ec3bf3cd29295da0f2277028f.tar.gz
nextcloud-server-48d9c4d2b093e12ec3bf3cd29295da0f2277028f.zip
Port existing server code to new interface
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'lib/private/BackgroundJob')
-rw-r--r--lib/private/BackgroundJob/Job.php4
-rw-r--r--lib/private/BackgroundJob/Legacy/QueuedJob.php2
-rw-r--r--lib/private/BackgroundJob/Legacy/RegularJob.php2
3 files changed, 6 insertions, 2 deletions
diff --git a/lib/private/BackgroundJob/Job.php b/lib/private/BackgroundJob/Job.php
index 399ff05134e..ffcaaf8c36d 100644
--- a/lib/private/BackgroundJob/Job.php
+++ b/lib/private/BackgroundJob/Job.php
@@ -66,6 +66,10 @@ abstract class Job implements IJob {
}
}
+ public function start(IJobList $jobList): void {
+ $this->execute($jobList);
+ }
+
abstract protected function run($argument);
public function setId(int $id) {
diff --git a/lib/private/BackgroundJob/Legacy/QueuedJob.php b/lib/private/BackgroundJob/Legacy/QueuedJob.php
index fd001738d4f..680c12046c9 100644
--- a/lib/private/BackgroundJob/Legacy/QueuedJob.php
+++ b/lib/private/BackgroundJob/Legacy/QueuedJob.php
@@ -26,7 +26,7 @@ namespace OC\BackgroundJob\Legacy;
/**
* @deprecated internal class, use \OCP\BackgroundJob\QueuedJob
*/
-class QueuedJob extends \OC\BackgroundJob\QueuedJob {
+class QueuedJob extends \OCP\BackgroundJob\QueuedJob {
public function run($argument) {
$class = $argument['klass'];
$method = $argument['method'];
diff --git a/lib/private/BackgroundJob/Legacy/RegularJob.php b/lib/private/BackgroundJob/Legacy/RegularJob.php
index 0f337a35eb0..c01d58efa2f 100644
--- a/lib/private/BackgroundJob/Legacy/RegularJob.php
+++ b/lib/private/BackgroundJob/Legacy/RegularJob.php
@@ -27,7 +27,7 @@ use OCP\AutoloadNotAllowedException;
/**
* @deprecated internal class, use \OCP\BackgroundJob\QueuedJob
*/
-class RegularJob extends \OC\BackgroundJob\Job {
+class RegularJob extends \OCP\BackgroundJob\Job {
public function run($argument) {
try {
if (is_callable($argument)) {