aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/BackgroundJob/QueuedJob.php
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-06-28 12:09:08 +0200
committerCarl Schwan <carl@carlschwan.eu>2022-08-08 17:03:13 +0200
commit19a2d6f6e7d54eb9318279809bf6c3f40bf566e2 (patch)
tree498590804c91807f34e91e93c6fa8c0d3fe06cea /lib/public/BackgroundJob/QueuedJob.php
parent9475cc02b218f7cab402ec0b2b370ed6c68650c1 (diff)
downloadnextcloud-server-19a2d6f6e7d54eb9318279809bf6c3f40bf566e2.tar.gz
nextcloud-server-19a2d6f6e7d54eb9318279809bf6c3f40bf566e2.zip
Deprecated ILogger from IJob
Since the ILogger will be soon removed we need to ensure that nothing in the public api use it. Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'lib/public/BackgroundJob/QueuedJob.php')
-rw-r--r--lib/public/BackgroundJob/QueuedJob.php15
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/public/BackgroundJob/QueuedJob.php b/lib/public/BackgroundJob/QueuedJob.php
index e7e6e9a2939..71f09fccdea 100644
--- a/lib/public/BackgroundJob/QueuedJob.php
+++ b/lib/public/BackgroundJob/QueuedJob.php
@@ -35,15 +35,26 @@ use OCP\ILogger;
abstract class QueuedJob extends Job {
/**
- * run the job, then remove it from the joblist
+ * Run the job, then remove it from the joblist
*
* @param IJobList $jobList
* @param ILogger|null $logger
*
* @since 15.0.0
+ * @deprecated since 25.0.0 Use start() instead. This method will be removed
+ * with the ILogger interface
*/
final public function execute($jobList, ILogger $logger = null) {
+ $this->start($jobList);
+ }
+
+ /**
+ * Run the job, then remove it from the joblist
+ *
+ * @since 15.0.0
+ */
+ final public function start(IJobList $jobList): void {
$jobList->remove($this, $this->argument);
- parent::execute($jobList, $logger);
+ parent::start($jobList);
}
}