diff options
Diffstat (limited to 'lib/public/BackgroundJob/QueuedJob.php')
-rw-r--r-- | lib/public/BackgroundJob/QueuedJob.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/public/BackgroundJob/QueuedJob.php b/lib/public/BackgroundJob/QueuedJob.php index c75948d1a11..75e27d1d60f 100644 --- a/lib/public/BackgroundJob/QueuedJob.php +++ b/lib/public/BackgroundJob/QueuedJob.php @@ -22,7 +22,7 @@ abstract class QueuedJob extends Job { * @param ILogger|null $logger * * @since 15.0.0 - * @deprecated since 25.0.0 Use start() instead. This method will be removed + * @deprecated 25.0.0 Use start() instead. This method will be removed * with the ILogger interface */ final public function execute($jobList, ?ILogger $logger = null) { @@ -35,7 +35,11 @@ abstract class QueuedJob extends Job { * @since 25.0.0 */ final public function start(IJobList $jobList): void { - $jobList->remove($this, $this->argument); + if ($this->id) { + $jobList->removeById($this->id); + } else { + $jobList->remove($this, $this->argument); + } parent::start($jobList); } } |