Skip to content

Commit 1da950c

Browse files
committed
like this then
1 parent 2129c44 commit 1da950c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Horizon/RabbitMQQueue.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class RabbitMQQueue extends BaseRabbitMQQueue
1818
/**
1919
* The job that last pushed to queue via the "push" method.
2020
*/
21-
protected string|object $lastPushed;
21+
protected string|object|null $lastPushed = null;
2222

2323
/**
2424
* Get the number of queue jobs that are ready to process.
@@ -48,7 +48,7 @@ public function push($job, $data = '', $queue = null)
4848
*/
4949
public function pushRaw($payload, $queue = null, array $options = []): int|string|null
5050
{
51-
$payload = (new JobPayload($payload))->prepare($this->lastPushed ?? null)->value;
51+
$payload = (new JobPayload($payload))->prepare($this->lastPushed)->value;
5252

5353
return tap(parent::pushRaw($payload, $queue, $options), function () use ($queue, $payload): void {
5454
$this->event($this->getQueue($queue), new JobPushed($payload));

0 commit comments

Comments
 (0)