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

Job is nil when burying #49

Closed
kuon opened this issue Oct 18, 2014 · 1 comment
Closed

Job is nil when burying #49

kuon opened this issue Oct 18, 2014 · 1 comment

Comments

@kuon
Copy link

kuon commented Oct 18, 2014

I am not sure if this is related to #28, but we see something the following in our logs:

17:59:12 jobs.1 | /Users/amos/.gem/ruby/2.1.3/gems/beaneater-0.3.3/lib/beaneater/job/collection.rb:107:in `rescue in block in process!': undefined method `bury' for nil:NilClass (NoMethodError)
17:59:12 jobs.1 |       from /Users/amos/.gem/ruby/2.1.3/gems/beaneater-0.3.3/lib/beaneater/job/collection.rb:110:in `block in process!'
17:59:12 jobs.1 |       from /Users/amos/.gem/ruby/2.1.3/gems/beaneater-0.3.3/lib/beaneater/job/collection.rb:92:in `loop'
17:59:12 jobs.1 |       from /Users/amos/.gem/ruby/2.1.3/gems/beaneater-0.3.3/lib/beaneater/job/collection.rb:92:in `process!'
17:59:12 jobs.1 |       from /Users/amos/Dev/memoways/kura/jobs/init.rb:100:in `work'
17:59:12 jobs.1 |       from jobs/worker.rb:5:in `<main>'
17:59:12 jobs.1 | exited with code 1

I am not sure why reserve returns nil:

https://github.com/beanstalkd/beaneater/blob/master/lib/beaneater/job/collection.rb#L94

It seems this commit 109b795 moved the reserve after the begin statement, which makes exceptions raised in reserve caught by the rescue.

@nesquena
Copy link
Member

This might be fixed by my commit (at least that line can't throw an exception now)

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

No branches or pull requests

2 participants