burke/multi_db — pull request #3 by burke (2012-10-31 23:20:33+00:00)
Title: MultiDb refactors and fixes

1) Changes the error handling to catch "Can't connect to MySQL server, and blacklist the slave.

2) Refactors about half of the logic out of ConnectionProxy into a new ConnectionStack class, with functioning tests.

3) Removes the `if Rails.env.test?`, replacing it with `with_slave_unless_in_transaction`, which a paired PR to shopify will change our around_filter to.

@hornairs @camilo @boourns