Framework Update

This commit is contained in:
2024-01-31 22:15:08 +08:00
parent b5ff5e8b5f
commit 20678a6a0c
1459 changed files with 25954 additions and 16153 deletions
@@ -2,6 +2,7 @@
namespace Illuminate\Redis\Connections;
use Predis\Command\Redis\FLUSHDB;
use Predis\Command\ServerFlushDatabase;
class PredisClusterConnection extends PredisConnection
@@ -13,8 +14,12 @@ class PredisClusterConnection extends PredisConnection
*/
public function flushdb()
{
$this->client->executeCommandOnNodes(
tap(new ServerFlushDatabase)->setArguments(func_get_args())
);
$command = class_exists(ServerFlushDatabase::class)
? ServerFlushDatabase::class
: FLUSHDB::class;
foreach ($this->client as $node) {
$node->executeCommand(tap(new $command)->setArguments(func_get_args()));
}
}
}