Skip to content

Commit

Permalink
Showing 2 changed files with 4 additions and 13 deletions.
11 changes: 1 addition & 10 deletions config/reverb.php
Original file line number Diff line number Diff line change
@@ -31,21 +31,12 @@
'reverb' => [
'host' => env('REVERB_HOST', 'localhost'),
'port' => env('REVERB_PORT', 8080),
'publish_events' => [
'scaling' => [
'enabled' => env('REVERB_SCALING_ENABLED', false),
'channel' => env('REVERB_SCALING_CHANNEL', 'reverb'),
],
],

'api_gateway' => [
'region' => env('REVERB_API_GATEWAY_REGION', 'us-east-1'),
'endpoint' => env('REVERB_API_GATEWAY_ENDPOINT'),
'connection_manager' => [
'store' => env('REVERB_API_GATEWAY_CONNECTION_CACHE', 'dynamodb'),
'prefix' => env('REVERB_API_GATEWAY_CONNECTION_CACHE_PREFIX', 'reverb'),
],
],

],

/*
6 changes: 3 additions & 3 deletions src/Servers/Reverb/ReverbProvider.php
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ class ReverbProvider extends ServerProvider
*/
public function __construct(protected Application $app, protected array $config)
{
$this->publishesEvents = (bool) $this->config['publish_events']['enabled'] ?? false;
$this->publishesEvents = (bool) $this->config['scaling']['enabled'] ?? false;
}

/**
@@ -60,7 +60,7 @@ public function publish(array $payload): void
{
$this->app->make(Client::class)
->publish(
$this->config['publish_events']['channel'] ?? 'reverb',
$this->config['scaling']['channel'] ?? 'reverb',
json_encode($payload)
);
}
@@ -74,7 +74,7 @@ public function subscribe(LoopInterface $loop): void
$this->redisUrl()
);

$redis->subscribe($this->config['publish_events']['channel'] ?? 'reverb');
$redis->subscribe($this->config['scaling']['channel'] ?? 'reverb');

$redis->on('message', function (string $channel, string $payload) {
$event = json_decode($payload, true);

0 comments on commit 85827b4

Please sign in to comment.