Projet

Général

Profil

Révision 9894864b

ID9894864b71dc8a25e8cc3ad3e9602c3c186b0e1f
Parent 84866ca6
Enfant 21d2262f

Ajouté par minitux il y a presque 12 ans

Update redis-speed add password option

Add password option in the redis connection

Voir les différences:

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