Skip to content

'bury' on StandardError in Process! needs checking #28

@pagojo

Description

@pagojo

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions