beanstalkd / beanstalkd/beaneater
'bury' on StandardError in Process! needs checking
- Dominant language
- Ruby
- Stars
- 201
- Forks
- 45
- PR merge metrics
- No merged PRs in 30d
Description
in the collection.rb https://github.com/beanstalkd/beaneater/blob/master/lib/beaneater/job/collection.rb#L98 when a StandardError is caught, before `job.bury` is used the `job` needs to be checked like in the `ensure` clause otherwise it may lead to try to bury a job which has already been deleted.
This may occur when
```
@beanstalk.jobs.register('whatever', :retry_on => [Timeout::Error]) do |job|
process(job)
screw_up_here_and_raise_some_exception()
end
```
in which case a weird `Beaneater::NotFoundError: Response failed with: NOT_FOUND` will percolate up from the `parse_response(cmd, res)` when it tries to send the `bury` command (which is very confusing)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in lib/beaneater/job/collection.rb around line 98 and compare the StandardError path with the job check in the ensure clause. Reproduce the retry_on Timeout::Error scenario, then verify the bury path does not attempt to bury a deleted job and no confusing NotFoundError is raised.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100