Skip to content

Commit 87a11d9

Browse files
committed
added: fixed issues
1 parent 9230262 commit 87a11d9

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/Consumer.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
use PhpAmqpLib\Message\AMQPMessage;
1313
use Symfony\Component\Debug\Exception\FatalThrowableError;
1414
use Throwable;
15-
use VladimirYuldashev\LaravelQueueRabbitMQ\Queue\Jobs\RabbitMQJob;
1615
use VladimirYuldashev\LaravelQueueRabbitMQ\Queue\RabbitMQQueue;
1716

1817
class Consumer extends Worker
@@ -74,7 +73,12 @@ public function daemon($connectionName, $queue, WorkerOptions $options): void
7473
null
7574
);
7675

77-
$jobClass = $connection->getJobClass();
76+
try {
77+
$jobClass = $connection->getJobClass();
78+
} catch (Throwable $exception) {
79+
report($exception);
80+
$this->kill(2);
81+
}
7882

7983
$this->channel->basic_consume(
8084
$queue,

src/Queue/RabbitMQQueue.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ public function getChannel(): AMQPChannel
276276

277277
/**
278278
* Gets the Job class from config or returns the default job class
279-
* when the job class does not extend the default job class an exception is thrown
279+
* when the job class does not extend the default job class an exception is thrown.
280280
*
281281
* @return array|\ArrayAccess|mixed
282282
* @throws \Throwable

0 commit comments

Comments
 (0)