mysql_replication_monitor 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG ADDED
@@ -0,0 +1,4 @@
1
+ 0.1.5
2
+ -----
3
+ * added option to raw_slave_status to prevent status refreshing since last status call if desired
4
+
@@ -134,9 +134,17 @@ class MysqlReplicationMonitor
134
134
 
135
135
 
136
136
  # return a hashed version of the result of running SHOW SLAVE STATUS
137
+ # options:
138
+ # :refresh_if_stale: indicate whether to refresh the status if it's stale
139
+ # default is true, which should pretty much always be
140
+ # used, unless you're doing some inspection and want to
141
+ # be sure to see the same status that was used by the
142
+ # most recent method call.
137
143
  #-----------------------------------------------------------------------------
138
- def raw_slave_status
139
- cache_check_or_refresh
144
+ def raw_slave_status(options = {})
145
+ if options.blank? || options[:refresh_if_stale]
146
+ cache_check_or_refresh
147
+ end
140
148
 
141
149
  @slave_status
142
150
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mysql_replication_monitor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - bmpercy
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-10-20 00:00:00 -07:00
12
+ date: 2009-12-02 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -33,6 +33,7 @@ extra_rdoc_files: []
33
33
  files:
34
34
  - lib/mysql_replication_monitor.rb
35
35
  - README
36
+ - CHANGELOG
36
37
  has_rdoc: true
37
38
  homepage:
38
39
  licenses: []