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

Commit e6f4a6a

Browse files
author
Steve Porter
authored
Merge pull request #7 from designmynight/booted-fix
fix: add connector once booted
2 parents 7fe8f21 + 8596a48 commit e6f4a6a

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)