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

Adding support for wildcard keys. #99

Closed
wants to merge 1 commit into from
Closed

Conversation

uchouhan
Copy link

@uchouhan uchouhan commented Jan 9, 2014

This pull requests adds the ability to use a wildcard key.

For Example: a key "queue*" will spin up a worker for each matching queue in Resque.queues. So, if the application has queued up jobs on queues queue1, queue2 and queue3, a worker will be created for each of those queues.

Excluding key with wildcard.

Escaping * for wildcard match.

Using #include for wildcard character comparison.

Fixing instance variable name.

Merging wildcard keys to original configuration.

Fixing wildcard key hash.

Removing wildcard key after hash is merged.
end

def config_hash_for_wildcard_keys
hash = {}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be a little cleaner..

{}.tap do |hash|
  wildcard_keys.each do |wildcard_key|
    hash[wildcard_key] = 1
  end
end

@nevans
Copy link
Collaborator

nevans commented Mar 25, 2015

I think this approach is obsoleted by #85. Thanks for your contribution!

@nevans nevans closed this Mar 25, 2015
@jzaleski
Copy link

Agreed. Thank you for getting around to closing it out.

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.

None yet

3 participants