-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
Description
Problem:
To perform redis commands in a "disconnected"(not instantiated yet) server is necessary call the connect method before call the command:
// don't works without call the connect method before:
$redis->getServersCollection()->getServer('some_server')->some_redis_command();
// works:
$this->redis->connect('some_server');
$redis->getServersCollection()->getServer('some_server')->some_redis_command();
Solution:
Servers configured in config file needs to be auto instantiated when called if not instantiated yet. Maybe a status(CONNECTED, DISCONNECTED) property in RedisServer.php class can help with this.
// this code will auto instantiate the server if not instantiated yet, by calling automatically the connect method:
$redis->getServersCollection()->getServer('some_server')->some_redis_command();
Reactions are currently unavailable