tasktiger icon indicating copy to clipboard operation
tasktiger copied to clipboard

StrictRedis causes redis.exceptions.ResponseError

Open scott-coates opened this issue 8 years ago • 2 comments

I'm using django-rq and, by default, it uses StrictRedis, which has a different, more correct API than the legacy Redis client class.

I can get around this by changing the REDIS_CLIENT_CLASS config in my django app.

'OPTIONS': {
  "REDIS_CLIENT_CLASS": "redis.client.Redis",
  'CONNECTION_POOL_KWARGS': {
    "decode_responses": True,
  }
},

However, if I use the StrictRedis client, I get the following error whenever a task is moved from ACTIVE to ERROR.

redis.exceptions.ResponseError: Command # 2 (ZADD t:error:default c0d4d2806d10037e0140b18ca3e8ec3f53f1e81812334ce833a4030cfec3bf69 1492030805.5607371) of

You can reproduce by using StrictRedis and forcing any task to fail.

For reference, this is similar to a this rq issue: https://github.com/ui/rq-scheduler/issues/16.

I'm happy to submit a PR if this is something you want to support. Thanks for the great project!

scott-coates avatar Apr 12 '17 21:04 scott-coates

Thanks for reporting this. A PR that makes TaskTiger work with both strict and non-strict Redis is welcome!

thomasst avatar Sep 29 '17 19:09 thomasst

related to #119

dawncold avatar Jan 27 '19 02:01 dawncold