binarymatt / pyres

a resque clone in python
http://github.com/binarydud/pyres
MIT License
955 stars 130 forks source link

get redis host/port from connection_pool object instead of main object #67

Closed joeshaw closed 13 years ago

joeshaw commented 13 years ago

redis-py 2.4.0 removed host/port accessors on the main Redis object. If those accessors aren't available, get a connection object from the connection_pool and get the host/port from there. Store the host and port on the ResQ object so we don't have to keep poking the connection pool.

binarymatt commented 13 years ago

this looks pretty simple, my biggest concern would be backward compatibility.

I'll probably merge this in for a 1.1 release since this would change the requirements to redis-py >= 2.4

joeshaw commented 13 years ago

I tried to address the backward compatibility by testing the redis object to see if it had a "host" property and using that if it did. It should work fine with old versions of the library.

binarymatt commented 13 years ago

sorry about that, I misread the diff. I'll try to get this out with a bug fix release I am planning on releasing this week.

joeshaw commented 13 years ago

Oops, have a bug in this. Will update.

joeshaw commented 13 years ago

feel free to squash those two commits together.