aboutsummaryrefslogtreecommitdiff
path: root/lib/mauve/timer.rb
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2011-06-15 19:44:07 +0100
committerPatrick J Cherry <patrick@bytemark.co.uk>2011-06-15 19:44:07 +0100
commit42f14de6ab50d0e05f49f038e40b94b686701bf1 (patch)
tree33dc459cf3ae32de8956690a990f080321a67a83 /lib/mauve/timer.rb
parent92e5d4e652aae161640359b41c0ba8dcaedac0ad (diff)
* Added Alert#subject to return source when subject unspecified
* Added extra arg to acknowledge! * Alert#all_raised / all_cleared does not returned ack'd alerts * Added sanitising for source/subject * Catch empty alert_group notifications in AlertChanged * Tidied up alert_group * Added skip bytemark_auth when RACK_ENV is development * Tidied up logging in MauveThread, Timer, UdpServer * Added extra convenience methods to Time and Date * Moved working/daylight/dead_zone hours into Time
Diffstat (limited to 'lib/mauve/timer.rb')
-rw-r--r--lib/mauve/timer.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/mauve/timer.rb b/lib/mauve/timer.rb
index 35e7aa8..40abe43 100644
--- a/lib/mauve/timer.rb
+++ b/lib/mauve/timer.rb
@@ -14,8 +14,6 @@ module Mauve
attr_accessor :sleep_interval, :last_run_at
def initialize
- @logger = Log4r::Logger.new self.class.to_s
- @logger.info("Timer singleton created.")
@initial_sleep = 300
@initial_sleep_threshold = 300
end
@@ -31,7 +29,7 @@ module Mauve
# look for the next alert_changed object.
#
if next_alert.nil? or next_alert.due_at > MauveTime.now
- @logger.debug("Next alert was #{next_alert} due at #{next_alert.due_at}") unless next_alert.nil?
+ logger.debug("Next alert was #{next_alert} due at #{next_alert.due_at}") unless next_alert.nil?
next_alert_changed = AlertChanged.find_next_with_event
end
@@ -53,12 +51,12 @@ module Mauve
#
# Sleep indefinitely
#
- @logger.debug("Nothing to notify about -- snoozing indefinitely.")
+ logger.debug("Nothing to notify about -- snoozing indefinitely.")
else
#
# La la la nothing to do.
#
- @logger.debug("Next to notify: #{next_to_notify} -- snoozing until #{next_to_notify.due_at}")
+ logger.debug("Next to notify: #{next_to_notify} -- snoozing until #{next_to_notify.due_at}")
end
#