Redis >= 3.0.0 not working
Dom4n opened this issue · comments
Because of this change:
https://github.com/andymccurdy/redis-py/blob/3.0.0/CHANGES#L27
* ZADD now requires all element names/scores be specified in a single dictionary argument named mapping. This was required to allow the NX, XX, CH and INCR options to be specified.
rq-scheduler stopped working.
I have done a little debugging and it seems that this line:
https://github.com/rq/rq-scheduler/blob/v0.8.3/rq_scheduler/scheduler.py#L212
and other lines that are using self.connection._zadd
are passing only timestamp instead of mapping as second argument.
Stacktrace:
File ".../python3.6/site-packages/rq_scheduler/scheduler.py", line 214, in schedule
job.id)
File ".../python3.6/site-packages/redis/client.py", line 2263, in zadd
for pair in iteritems(mapping):
File ".../python3.6/site-packages/redis/_compat.py", line 124, in iteritems
return iter(x.items())
AttributeError: 'int' object has no attribute 'items'
Right now I don`t have time to try fixing it, so just reporting 😄
@Dom4n Do you have a solution yet? I am totally stuck and cannot deploy my updates to server
Right now I have set redis<3
in requirements.txt / Pipfile file in my projects.
Or just install older version: pip install "redis<3"
Support for Redis 3 has just been merged into RQ rq/rq#1016 . PR welcome!
Fixed in #198