From 8bf09be513cf3d5bbca979830765acdf6a5c5707 Mon Sep 17 00:00:00 2001 From: Joe Dixon Date: Wed, 8 May 2024 12:51:50 +0100 Subject: [PATCH] wip --- src/Protocols/Pusher/MetricsHandler.php | 2 +- src/Servers/Reverb/Publishing/RedisPubSubProvider.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Protocols/Pusher/MetricsHandler.php b/src/Protocols/Pusher/MetricsHandler.php index 0057cec5..59c4fd70 100644 --- a/src/Protocols/Pusher/MetricsHandler.php +++ b/src/Protocols/Pusher/MetricsHandler.php @@ -212,7 +212,7 @@ protected function mergeChannels(array $metrics): array protected function listenForMetrics(string $key): Deferred { dump('Listenting on '.$key); - + $deferred = new Deferred; $this->pubSubProvider->on('metrics-retrieved', function ($payload) use ($key, $deferred) { diff --git a/src/Servers/Reverb/Publishing/RedisPubSubProvider.php b/src/Servers/Reverb/Publishing/RedisPubSubProvider.php index 5721e5ed..844801a6 100644 --- a/src/Servers/Reverb/Publishing/RedisPubSubProvider.php +++ b/src/Servers/Reverb/Publishing/RedisPubSubProvider.php @@ -63,6 +63,7 @@ public function subscribe(): void */ public function on(string $event, callable $callback): void { + dump('Listening from provider...'); $this->subscribingClient->on('message', function (string $channel, string $payload) use ($event, $callback) { dump($payload); $payload = json_decode($payload, associative: true, flags: JSON_THROW_ON_ERROR); @@ -71,6 +72,7 @@ public function on(string $event, callable $callback): void $callback($payload); } }); + dump('Listening from provider...done'); } /**