binarymatt / pyres

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

AttributeError: 'Redis' object has no attribute 'host' #68

Closed srounet closed 13 years ago

srounet commented 13 years ago

(branch 1.0.1) In resweb/views.py at line 23 we have:

return '%s:%s' % (self.resq.redis.host, self.resq.redis.port)

What you need is address and port. I Haven't found a reference to host and port but,

self.resq.dsn is 'localhost:6379'. 

so maybe :

host, port = self.resq.dsn.split(':')
binarymatt commented 13 years ago

do you know what version of redis-py you are running?

srounet commented 13 years ago

Yes it's 2.4.5

>>> redis.__version__
'2.4.5'
binarymatt commented 13 years ago

there is actually a patch that will fix this that I am going to try and apply to trunk later today. Hopefully I can wrap up a release sometime this week.

srounet commented 13 years ago

Ok i fixed mine by returning self.resq.dsn

def address(self):
  return self.resq.dsn
binarymatt commented 13 years ago

this should be fixed in the release 1.1 that I just pushed up to pypi