Reverted more __call() to direct calls

This commit is contained in:
Alex Renoki 2020-09-07 09:34:06 +03:00
parent 3555b471cd
commit de6b1b28ba
1 changed files with 3 additions and 2 deletions

View File

@ -276,13 +276,14 @@ class RedisClient extends LocalClient
*/
public function channelMemberCounts($appId, array $channelNames): PromiseInterface
{
$this->publishClient->__call('multi', []);
$this->publishClient->multi();
foreach ($channelNames as $channel) {
$this->publishClient->hlen($this->getTopicName($appId, $channel));
}
return $this->publishClient->__call('exec', [])
return $this->publishClient
->exec()
->then(function ($data) use ($channelNames) {
return array_combine($channelNames, $data);
});