Permalink
Browse files

Merge pull request #84 from eric/fix-mysql-replication-window

Fix MySQL replication window handling
  • Loading branch information...
itsderek23 committed Mar 23, 2013
2 parents 6b5e915 + ce90e1a commit 2ff6588a584dc420876a667395dac9abc785b3b0
Showing with 4 additions and 4 deletions.
  1. +4 −4 mysql_replication_monitor/mysql_replication_monitor.rb
@@ -70,14 +70,14 @@ def build_report
end
def in_ignore_window?
- if s=option(:ignore_window_start) && e=option(:ignore_window_end)
+ if (s = option(:ignore_window_start)) && (e = option(:ignore_window_end))
start_time = Time.parse("#{Date.today} #{s}")
end_time = Time.parse("#{Date.today} #{e}")
- if start_time<end_time
- return(Time.now > start_time and Time.now < end_time)
+ if start_time < end_time
+ return Time.now > start_time and Time.now < end_time
else
- return(Time.now > start_time or Time.now < end_time)
+ return Time.now > start_time or Time.now < end_time
end
else
false

0 comments on commit 2ff6588

Please sign in to comment.