Skip to content
This repository was archived by the owner on Sep 23, 2024. It is now read-only.

Commit 497e5b8

Browse files
author
Steve Porter
committed
fix: add connector once booted
1 parent 5a0013f commit 497e5b8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/HorizonServiceProvider.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,12 @@ protected function registerEvents()
4242
*/
4343
protected function registerQueueConnectors()
4444
{
45-
$queue = $this->app['queue'];
45+
$this->app->booted(function(){
46+
$queue = $this->app['queue'];
4647

47-
$queue->addConnector('rabbitmq', function () {
48-
return new RabbitMQConnector($this->app['events']);
48+
$queue->addConnector('rabbitmq', function () {
49+
return new RabbitMQConnector($this->app['events']);
50+
});
4951
});
5052
}
5153

0 commit comments

Comments
 (0)