Skip to content

Commit a962186

Browse files
committed
5.4 changes
1 parent 371bcef commit a962186

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/VladimirYuldashev/LaravelQueueRabbitMQ/Queue/Jobs/RabbitMQJob.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,12 @@ public function __construct(
5959
*/
6060
public function fire()
6161
{
62-
$payload = $this->payload();
63-
64-
list($class, $method) = JobName::parse($payload['job']);
62+
try {
63+
$payload = $this->payload();
6564

66-
$this->instance = $this->resolve($class);
65+
list($class, $method) = JobName::parse($payload['job']);
6766

68-
try {
69-
$this->instance->{$method}($this, $payload['data']);
67+
with($this->instance = $this->resolve($class))->{$method}($this, $payload['data']);
7068
} catch (Exception $exception) {
7169
if (
7270
$this->causedByDeadlock($exception) ||

0 commit comments

Comments
 (0)