Browse files

Make DB#probe return self, instead of returning what probe_slaves spe…

…ws out from SHOW PROCESSLIST
  • Loading branch information...
1 parent f66e38b commit 58876293206b46bfc6c4253d1b69563d93efcc97 @evanelias evanelias committed Jun 8, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/jetpants/db/state.rb
View
3 lib/jetpants/db/state.rb
@@ -61,6 +61,7 @@ def probe(force=false)
probe_running
probe_master
probe_slaves
+ self
end
# Alias for probe(true)
@@ -218,7 +219,7 @@ def probe_slaves
processes.grep(/Binlog Dump/).concurrent_each do |p|
tokens = p.split
ip, dummy = tokens[2].split ':'
- db = self.class.new(ip)
+ db = ip.to_db
db.probe
slaves_mutex.synchronize {@slaves << db if db.master == self}
end

0 comments on commit 5887629

Please sign in to comment.