Hi,
I have a rails application, part of which reads data from a slave. There
is two slaves which is available for it to read from. Problem is, the
replication occasionally stops on either of these slave.
Therefore, I would like to set up the application with a recurring rake
task that checks if replication has stopped on the slave it currently
uses. If so, it should switch to the other slave and begin using that
one.
I could do this by cycling to database.yml files, and renaming them /
rebooting the application when the replication stops. But that''s a very
ugly solution - does anyone know a better way to do this?
Thanks
/Markus
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---