New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reconnect option use with non 0 number database is messy #28

Closed
typester opened this Issue Nov 7, 2012 · 4 comments

Comments

Projects
None yet
2 participants
@typester
Copy link

typester commented Nov 7, 2012

Hi,

I sometimes use Redis.pm for multiple database with reconnect option like following:

my $redis = Redis->new( reconnect => 3, every => 200, ...);
$redis->select($db_number);

### operation

But after once redis was restarted and Redis.pm do reconnection, the operation continues to database 0...
I think that It is difficult to handle multiple database with reconnect option at this time.

I suggest some solutions for this.

a) Accept dbnumber (or something similar) paramerter on constructor (same as :db param in redis.rb)
b) DBIx::Class's on_connect_do like connect hook feature

I hope either or something same feature ASAP!

@melo

This comment has been minimized.

Copy link
Member

melo commented Nov 8, 2012

See if 70adaa4 works for you.

I'll do a release with it later today.

@typester

This comment has been minimized.

Copy link

typester commented Nov 9, 2012

It works fine for me. Thanks.

Also, I like this interface, much nicer than mime. @melo++

@melo

This comment has been minimized.

Copy link
Member

melo commented Nov 9, 2012

Well, not many people like the mime interface ;)

I have a build failure from Travis to investigate, but the Travis site was down yesterday so I didn't release it. I'll check it this morning and do a release.

@melo

This comment has been minimized.

Copy link
Member

melo commented Jan 15, 2013

Sorry it took so long to release this, doing it now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment