Make Sidekiq more Resque compatible#12
Merged
mperham merged 15 commits intosidekiq:masterfrom Feb 10, 2012
Merged
Conversation
…a redis-namespace gem
Collaborator
|
This is great, thanks! I worry that the redis connection code is becoming a tangled web of config logic so I'd like to abstract this into storage adapters but this is a great start. |
mperham
added a commit
that referenced
this pull request
Feb 10, 2012
Make Sidekiq more Resque compatible
Contributor
Author
|
The only reason I had those ternaries was to silence unnasigned instance variable warnings when running the tests, but yeah I agree they're redundant :) |
Contributor
|
Is there a quick how-to on how to enable the ResqueWebCompatability middleware? |
Contributor
|
I tried the following: Sidekiq::Client.middleware.register do
use Sidekiq::Middleware::Client::ResqueWebCompatability
endwhich gives: uninitialized constant Sidekiq::Middleware::Client::ResqueWebCompatability (NameError) |
Collaborator
|
Spelling is fundamental. ;-) |
Contributor
|
I copied from: I know it's supposed to be Compatibility, but I copied what I saw:) |
Collaborator
|
It will be enabled by default in about 30 minutes. |
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resque always namespaces it's keys either with 'resque:' by default, or with a user defined namespace. So to make Sidekiq compatible with existing Resque installations, I've added namespacing support.
In addition, resque-web uses a set under the 'queues' key to determine which queues to display in it's main dashboard, so I've added a client middleware that adds the queue of the job being queued to that set.
I also refactored all the disparate calls to create redis connections into a single class so there's less repetition.
Thanks for a killer lib!
💰
Max