diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-06-28 12:55:26 +0200 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2022-08-08 17:03:19 +0200 |
commit | 48d9c4d2b093e12ec3bf3cd29295da0f2277028f (patch) | |
tree | d66f1d2f54e8ae745fc7ce7bf067ce2072eeac6a /lib/private/BackgroundJob | |
parent | 19a2d6f6e7d54eb9318279809bf6c3f40bf566e2 (diff) | |
download | nextcloud-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.php | 4 | ||||
-rw-r--r-- | lib/private/BackgroundJob/Legacy/QueuedJob.php | 2 | ||||
-rw-r--r-- | lib/private/BackgroundJob/Legacy/RegularJob.php | 2 |
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)) { |