Révision 9894864b
Update redis-speed add password option
Add password option in the redis connection
| plugins/redis/redis-speed | ||
|---|---|---|
| 25 | 25 |
|
| 26 | 26 |
my $HOST = exists $ENV{'host'} ? $ENV{'host'} : "127.0.0.1";
|
| 27 | 27 |
my $PORT = exists $ENV{'port'} ? $ENV{'port'} : 6379;
|
| 28 |
my $PASSWORD = exists $ENV{'password'} ? $ENV{'password'} : undef ;
|
|
| 28 | 29 |
|
| 29 | 30 |
my $server = "$HOST:$PORT"; |
| 30 |
my $r = Redis->new( server => sprintf("%s:%d", $HOST, $PORT) );
|
|
| 31 |
my $r = Redis->new( server => $server, password => $PASSWORD );
|
|
| 31 | 32 |
|
| 32 | 33 |
my $config = ( defined $ARGV[0] and $ARGV[0] eq "config" ); |
| 33 | 34 |
|
Formats disponibles : Unified diff