Hello,
I guess this is a feature request.
The TYPE parameter was added to the SCAN command on the Redis class in #1650, but it is not available on the RedisCluster class, is there a reason?
I need to scan for existing streams on a cluster, current way:
$redis = new \RedisCluster(null, $config['servers']);
$streams = [];
foreach ($redis->_masters() as $master) {
$cursor = 0;
do {
$result = $redis->rawcommand($master, 'SCAN', $cursor, 'TYPE', 'STREAM');
$cursor = (int) $result[0];
if (count($result[1] ?? []) > 0) {
array_push($streams, ...$result[1]);
}
} while ($cursor !== 0);
}
Expected:
$redis = new \RedisCluster(null, $config['servers']);
$streams = [];
foreach ($redis->_masters() as $master) {
$cursor = null;
do {
$result = $redis->scan($cursor, $master, type: 'STREAM');
if ($result !== false) {
array_push($streams, ...$result);
}
} while ($cursor !== 0);
}
Thanks!
Hello,
I guess this is a feature request.
The TYPE parameter was added to the SCAN command on the
Redisclass in #1650, but it is not available on theRedisClusterclass, is there a reason?I need to scan for existing streams on a cluster, current way:
Expected:
Thanks!