jondot / sneakers

A fast background processing framework for Ruby and RabbitMQ
https://github.com/jondot/sneakers
MIT License
2.25k stars 332 forks source link

Handle all exceptions #441

Closed sharshenov closed 3 years ago

sharshenov commented 4 years ago

Previously Sneakers was able to handle StandardError and ScriptError exceptions and their descendants. But there are more exceptions that could cause problems.

In case of these exceptions, the handler is unable to report job state to the RabbitMQ. RabbitMQ keeps sending new jobs to the Sneakers until prefetch value reached. It makes Sneakers worker hang without processing any new message.

Closes #412

sharshenov commented 4 years ago

The failed job of Travis seems to be irrelevant to the PR.

sharshenov commented 3 years ago

@michaelklishin sorry for tagging you, but this PR resolves a bug when errors such as SystemStackError may cause Sneakers consumer outage. Any chance of this change to be reviewed?

michaelklishin commented 3 years ago

Thank you for spotting this.