A bad queue.connection will cause the worker to hang. This PR checks queue.connection when it is about to be used and replaces it with a new one from the pool if it's bad. There is a caveat regarding the active jobs of the worker using the queue. The worker no longer holds the advisory locks for those active jobs so they will be swept.
Fixes #162
A bad queue.connection will cause the worker to hang. This PR checks queue.connection when it is about to be used and replaces it with a new one from the pool if it's bad. There is a caveat regarding the active jobs of the worker using the queue. The worker no longer holds the advisory locks for those active jobs so they will be swept.