Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not kill the worker thread on connection timeouts
Just like #66, we've seen instances of a que worker using fewer threads than desired after failing to checking out a connection from AR. In some cases, this can lead to a worker doing nothing (specifically, this can happen if the que worker is configured to run with a single thread -- if that thread dies, the worker will sit idle doing nothing forever). This commit lets the ActiveRecord adapter handle the case where the connection could not be estabilished for reasons other than a timeout, which was already handled. Additionally, the internal `UnavailableConnection` exception will also now include the original exception as a nested `.cause` attribute to aid debugging.
- Loading branch information