closeio / closeio/tasktiger

StrictRedis causes redis.exceptions.ResponseError

Open
#61 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.5k
Forks
95
Avg merge
4d 21h
Merged PRs (30d)
1

Description

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!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure with StrictRedis and a task forced from ACTIVE to ERROR. Trace the transition that issues the ZADD command for the error queue and compare it with the Redis client configuration described in the issue; done means failed tasks can move to ERROR without redis.exceptions.ResponseError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, redis
Domain
backend, databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.