beanstalkd / beanstalkd/beaneater

Process! is not propagating Beaneater::NotConnected exception.

Open
#67 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
201
Forks
45
PR merge metrics
No merged PRs in 30d

Description

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
```
4. Stop the beanstalk server.
5. The consumer is now hung as the process! method keeps retrying considering Beaneater::NotConnected as a StandardError.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the `process!` method and trace how it handles `StandardError` and `Beaneater::NotConnected`. The issue’s reproduction steps show how to trigger the failure by stopping beanstalkd; done means `process!` no longer hangs retrying and allows the connection exception to propagate.

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
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.