AnyEvent-Redis-RipeRedis
view release on metacpan or search on metacpan
is called in both cases: when operation was completed successfully and when
some error occurred.
- Improved POD.
- Improved unit tests.
- Another wave of refactoring.
1.254 Mon Jun 9 17:44:55 MSK 2013
- Minor changes in POD.
1.253 Wed May 31 14:38:35 MSK 2013
- BUGFIX: Fixed premature triggering of the 'rtimeout' timer in some cases.
1.252 Wed May 29 11:00:45 MSK 2013
- BUGFIX: Fixed reading from the uninitialized read buffer in some cases.
- Now, in tests empty TCP port is taken using module Net::EmptyPort.
1.251 Fri Apr 26 11:29:05 MSK 2013
- Slight modification of examples in POD
1.250 Thu Apr 25 22:00:30 MSK 2013
- Improved error handling for EXEC command and for Lua scripts, which returns
examples/subs.pl view on Meta::CPAN
print "Unsubscribed: $pattern. Remaining: $channels_num\n";
if ( $channels_num == 0 ) {
$cv->send();
}
},
}
);
my $timer;
$timer = AE::timer( 5, 0,
sub {
undef( $timer );
exit 0; # Emergency exit
},
);
};
my $int_w = AE::signal( INT => $on_signal );
my $term_w = AE::signal( TERM => $on_signal );
$cv->recv();
examples/unix_socket.pl view on Meta::CPAN
on_connect => sub {
print "Connected to Redis server\n";
},
on_disconnect => sub {
print "Disconnected from Redis server\n";
},
);
my $timer;
$timer = AE::timer( 0, 1,
sub {
$redis->incr( 'foo',
sub {
my $data = shift;
if ( @_ ) {
my $err_msg = shift;
warn $err_msg;
lib/AnyEvent/Redis/RipeRedis.pm view on Meta::CPAN
$self->{_lazy_conn_st} = $params{lazy};
$self->{_auth_st} = S_NEED_PERFORM;
$self->{_select_db_st} = S_NEED_PERFORM;
$self->{_ready_to_write} = 0;
$self->{_input_queue} = [];
$self->{_temp_queue} = [];
$self->{_processing_queue} = [];
$self->{_txn_lock} = 0;
$self->{_channels} = {};
$self->{_channel_cnt} = 0;
$self->{_reconnect_timer} = undef;
unless ( $self->{_lazy_conn_st} ) {
$self->_connect();
}
return $self;
}
sub multi {
my $self = shift;
lib/AnyEvent/Redis/RipeRedis.pm view on Meta::CPAN
}
}
elsif ( $self->{_lazy_conn_st} ) {
$self->{_lazy_conn_st} = 0;
$self->_connect();
}
elsif ( $self->{reconnect} ) {
if ( defined $self->{min_reconnect_interval}
&& $self->{min_reconnect_interval} > 0 )
{
unless ( defined $self->{_reconnect_timer} ) {
$self->{_reconnect_timer} = AE::timer( $self->{min_reconnect_interval}, 0,
sub {
undef $self->{_reconnect_timer};
$self->_connect();
}
);
}
}
else {
$self->_connect();
}
}
else {
t/07-lazy-conn.t view on Meta::CPAN
host => $SERVER_INFO->{host},
port => $SERVER_INFO->{port},
lazy => 1,
reconnect => 0,
on_connect => sub {
$T_IS_CONN = 1;
},
);
my $timer;
$timer = AnyEvent->timer(
after => 3,
cb => sub {
undef $timer;
ok( !$T_IS_CONN, 'lazy connection (no connected yet)' );
$REDIS->ping(
{ on_done => sub {
$cv->send();
},
}
);
},
t/09-conn-errors.t view on Meta::CPAN
$cv->send();
},
on_error => sub {
$t_cli_err_msg = shift;
$t_cli_err_code = shift;
},
);
$redis->ping(
{ on_done => sub {
my $timer;
$timer = AE::postpone(
sub {
undef $timer;
$server_info->{server}->stop();
}
);
},
}
);
}
);
$server_info = run_redis_instance(
t/test_helper.pl view on Meta::CPAN
};
}
sub ev_loop {
my $sub = shift;
my $cv = AE::cv();
$sub->( $cv );
my $timer = AE::timer( 10, 0,
sub {
diag( 'Emergency exit from event loop. Test failed' );
$cv->send();
}
);
$cv->recv();
return;
}
( run in 0.263 second using v1.01-cache-2.11-cpan-26ccb49234f )