diff --git a/src/Worker.php b/src/Worker.php index a4cf073..8f01de4 100644 --- a/src/Worker.php +++ b/src/Worker.php @@ -259,7 +259,9 @@ public function perform(JobInterface $job) if ($this->options['pre_perform']) { $this->options['pre_perform'](); } - $job->perform(); + + $this->performJob($job); + if ($this->options['post_perform']) { $this->options['post_perform'](); } @@ -772,6 +774,11 @@ protected function failJob($job, Exception $exception) $this->getStatistic('failed')->incr(); } + protected function performJob(JobInterface $job): void + { + $job->perform(); + } + /** * Prepares the list of queues for a job to reserved *