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

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

Open
b-sridhar opened this issue Jun 21, 2017 · 1 comment
Open

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

b-sridhar opened this issue Jun 21, 2017 · 1 comment

Comments

@b-sridhar
Copy link

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.
@b-sridhar
Copy link
Author

@nesquena @nicotaing , Could you please look into this issue?

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

1 participant