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

Strange bug with starting resque-pool #105

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

toots
Copy link

@toots toots commented Mar 5, 2014

Hi,

We've run into a bug here using resque-pool:

resque-pool-0.3.0/lib/resque/pool.rb:312:in `worker_delta_for': undefined method `-' for nil:NilClass (NoMethodError)

I haven't been able to fully understand the issue where here's how the config object looks at line 312:

{"ac446872-4ad9-4f69-b075-a8017aa9e049"=>1, "foo-1"=>nil}

The function is called for foo-1 so we get nil and boom.

This PR is a naive fix.. Maybe there's a better way to deal with this issue?

@nevans
Copy link
Collaborator

nevans commented Jan 28, 2015

That looks like an invalid config to me. It ought to be a {"queue spec" => count} hash, and nil count indicates an error. We could silently eat the nil and pretend it's a zero (as you did). But I think it's probably better to give a very loud warning or even a fatal error for an invalid config.

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

2 participants