@@ 62-70 (lines=9) @@ | ||
59 | */ |
|
60 | public function register() |
|
61 | { |
|
62 | $this->app->singleton('redis-sentinel', function ($app) { |
|
63 | $this->createHorizonConnectionConfiguration(); |
|
64 | ||
65 | $class = $this->config->getVersionedRedisSentinelManagerClass(); |
|
66 | $config = $this->config->get('database.redis-sentinel', [ ]); |
|
67 | $driver = Arr::pull($config, 'client', 'predis'); |
|
68 | ||
69 | return new RedisSentinelManager(new $class($driver, $config)); |
|
70 | }); |
|
71 | ||
72 | if ($this->shouldRebindHorizonRedisFactory()) { |
|
73 | $this->rebindHorizonRedisFactory(); |
@@ 85-91 (lines=7) @@ | ||
82 | */ |
|
83 | protected function registerServices() |
|
84 | { |
|
85 | $this->app->singleton('redis-sentinel', function ($app) { |
|
86 | $class = $this->config->getVersionedRedisSentinelManagerClass(); |
|
87 | $config = $this->config->get('database.redis-sentinel', [ ]); |
|
88 | $driver = Arr::pull($config, 'client', 'predis'); |
|
89 | ||
90 | return new RedisSentinelManager(new $class($driver, $config)); |
|
91 | }); |
|
92 | ||
93 | $this->app->singleton('redis-sentinel.manager', function ($app) { |
|
94 | return $app->make('redis-sentinel')->getVersionedManager(); |