binarymatt / pyres

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

unknown command 'BLPOP' #69

Closed srounet closed 13 years ago

srounet commented 13 years ago

module

pyres: 1.1
redis: 2.4.5

binnary

redis-server: 2:1.2.0-1

distrib:

ubuntu server: 10.04

calling:

PYTHONPATH='.' pyres_worker main

I have the same issue with pyres_manager

Traceback (most recent call last):
  File "/home/xxxx/.virtualenvs/py27/bin/pyres_worker", line 8, in <module>
    load_entry_point('pyres==1.1', 'console_scripts', 'pyres_worker')()
  File "/home/xxxx/.virtualenvs/py27/lib/python2.7/site-packages/pyres/scripts.py", line 107, in pyres_worker
    Worker.run(queues, server, interval)
  File "/home/xxxx/.virtualenvs/py27/lib/python2.7/site-packages/pyres/worker.py", line 282, in run
    worker.work()
  File "/home/xxxx/.virtualenvs/py27/lib/python2.7/site-packages/pyres/worker.py", line 135, in work
    job = self.reserve(interval)
  File "/home/xxxx/.virtualenvs/py27/lib/python2.7/site-packages/pyres/worker.py", line 216, in reserve
    job = self.job_class.reserve(q, self.resq, self.__str__(), timeout=timeout)
  File "/home/xxxx/.virtualenvs/py27/lib/python2.7/site-packages/pyres/job.py", line 91, in reserve
    payload = res.pop(queue, timeout=timeout)
  File "/home/xxxx/.virtualenvs/py27/lib/python2.7/site-packages/pyres/__init__.py", line 109, in pop
    ret = self.redis.blpop("resque:queue:%s" % queue, timeout=timeout)
  File "/home/xxxx/.virtualenvs/py27/lib/python2.7/site-packages/redis/client.py", line 533, in blpop
    return self.execute_command('BLPOP', *keys)
  File "/home/xxxx/.virtualenvs/py27/lib/python2.7/site-packages/redis/client.py", line 235, in execute_command
    return self.parse_response(connection, command_name, **options)
  File "/home/xxxx/.virtualenvs/py27/lib/python2.7/site-packages/redis/client.py", line 245, in parse_response
    response = connection.read_response()
  File "/home/xxxx/.virtualenvs/py27/lib/python2.7/site-packages/redis/connection.py", line 212, in read_response
    raise response
    redis.exceptions.ResponseError: unknown command 'BLPOP'
binarymatt commented 13 years ago

This is because you are using a redis server that doesn't support the command. I believe that redis 2.2 was the first redis that supported the blpop command. How did you install redis?

binarymatt commented 13 years ago

also, I believe this change happened for the pyres 1.0 release. The pyres 0.9.1 release should work for you if you cannot upgrade your redis server. I'd recommend upgrading though, the 2.2 version is the official production ready version of the server.

srounet commented 13 years ago

Ok nice to notice that, I will upgrade my redis-server.

I Confirm that it's working with redis 2.2.10