Skip to content

Instantly share code, notes, and snippets.

@tjhanley
Last active December 13, 2015 18:58
Show Gist options
  • Save tjhanley/4958681 to your computer and use it in GitHub Desktop.
Save tjhanley/4958681 to your computer and use it in GitHub Desktop.
crap
Original Gem:
https://github.com/Lytro/multi_db/blob/master/lib/multi_db/connection_proxy.rb#L74
Alvin and My fix:
https://github.com/alvinlai/multi_db/blob/bugfix-load-wrong-slave-db/lib/multi_db/connection_proxy.rb#L74
see ^
look closer... diff:
https://github.com/alvinlai/multi_db/commit/3c5d15a3a9cd2d759f89426f290aef63f6758b77#lib/multi_db/connection_proxy.rb
Original catches
production_slave_database
production_slave_database_02
...
and also
metrics_production_slave_database... this is very bad. If the application can't connect to production_slave_database or production_slave_database_02 it will try to connect to metrics_production_slave_database. Which doesn't have core application models...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment