Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to set a custom prefix for the redis keys. #459

Closed
wants to merge 1 commit into from
Closed

Ability to set a custom prefix for the redis keys. #459

wants to merge 1 commit into from

Conversation

jayblank
Copy link

@jayblank jayblank commented Dec 5, 2014

It's possible that multiple applications will want to use the same Redis instance as their queue storage. Right now all queues and jobs are layered on top of each other. This allows adding a custom prefix to the beginning of all Redis keys used in a particular application.

Also, it looks like my clean-up scripts changed all the assertEquals to assertEqual per deprecation of the alias.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.19%) when pulling 9476040 on jayblank:feature/custom-rq-namespace into 2091c60 on nvie:master.

@nvie
Copy link
Collaborator

nvie commented Dec 14, 2014

I like this idea a lot, but I'm not sure if I'm happy with the proposed implementation. The global setting still makes it hard to reuse multiple Redis instances in the same Python process. I think every object (Job, Worker, Queue, etc.) needs to have an explicit record of the key prefix to be most explicit. This does mean passing it around a bit, but this is just a fact of life if we want to avoid global state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants