Skip to content

Process! is not propagating Beaneater::NotConnected exception. #67

@b-sridhar

Description

@b-sridhar

As mentioned in the title, the process! method does not propagate or break from the while loop when there is Beaneater::NotConnected exception i.e when the Beanstalkd goes down.

Steps to reproduce:

  1. Start beanstalk: beanstalkd -l 192.168.50.21 -p 11300 &
  2. Put messages to the queue.
  3. Start the consumer.
@beanstalk = Beaneater.new('192.168.50.21:11300')
begin
  @beanstalk.jobs.register('my-tube') do |job|
      puts "Job: #{job.inspect}"
    end
  @beanstalk.jobs.process!({:reserve_timeout => 10})
rescue Exception => e
  puts "Exception: #{e.inspect}"
  @beanstalk.close
end
  1. Stop the beanstalk server.
  2. The consumer is now hung as the process! method keeps retrying considering Beaneater::NotConnected as a StandardError.

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