Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add Ruby 1.9 compatability to MySQL Replication Monitor

Without this, plugin fails to compile with `void value expression`
  • Loading branch information...
commit 78079dba36202e98681f454d40eccb15e55262c0 1 parent 2ff6588
@technicalpickles technicalpickles authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 mysql_replication_monitor/mysql_replication_monitor.rb
View
10 mysql_replication_monitor/mysql_replication_monitor.rb
@@ -42,14 +42,14 @@ def build_report
if h.nil?
error("Replication not configured")
else
- if h["Seconds_Behind_Master"].nil? and !down_at
+ if h["Seconds_Behind_Master"].nil? && !down_at
if in_ignore_window?
res["Replication Running"]=1
else
res["Replication Running"]=0
down_at = Time.now
end
- elsif h["Slave_IO_Running"] == "Yes" and h["Slave_SQL_Running"] == "Yes"
+ elsif h["Slave_IO_Running"] == "Yes" && h["Slave_SQL_Running"] == "Yes"
res["Seconds Behind Master"] = h["Seconds_Behind_Master"]
res["Replication Running"]=1
down_at = nil if down_at
@@ -75,13 +75,13 @@ def in_ignore_window?
end_time = Time.parse("#{Date.today} #{e}")
if start_time < end_time
- return Time.now > start_time and Time.now < end_time
+ return Time.now > start_time && Time.now < end_time
else
- return Time.now > start_time or Time.now < end_time
+ return Time.now > start_time || Time.now < end_time
end
else
false
end
end
-end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.