Skip to content

Commit

Permalink
Make DB#probe return self, instead of returning what probe_slaves spe…
Browse files Browse the repository at this point in the history
…ws out from SHOW PROCESSLIST
  • Loading branch information
evanelias committed Jun 8, 2012
1 parent f66e38b commit 5887629
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/jetpants/db/state.rb
Expand Up @@ -61,6 +61,7 @@ def probe(force=false)
probe_running
probe_master
probe_slaves
self
end

# Alias for probe(true)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5887629

Please sign in to comment.