123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
- declare(strict_types=1);
- namespace OCP\BackgroundJob;
- use OCP\ILogger;
- abstract class QueuedJob extends Job {
-
- final public function execute($jobList, ?ILogger $logger = null) {
- $this->start($jobList);
- }
-
- final public function start(IJobList $jobList): void {
- if ($this->id) {
- $jobList->removeById($this->id);
- } else {
- $jobList->remove($this, $this->argument);
- }
- parent::start($jobList);
- }
- }
|