diff options
author | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-08-18 18:11:10 +0100 |
---|---|---|
committer | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-08-18 18:11:10 +0100 |
commit | 6aba0c3d8e2d30797755dc8b968fe338e13b8df4 (patch) | |
tree | a9c3a469146a47fe88e3a56c8bf40c0ed9b66288 /lib/mauve/server.rb | |
parent | c30daf56d4aab9e41a993d82406cba947c8efe32 (diff) |
* Fixed up Alert to postpone raises/clears within initial sleep period for old alerts
* Fixed up AlertChanged to do the same
* Added a migration method for the new AlertHistories table
* added singleton cleanup for tests
* moar tests
* cleaned up Alert a bit
Diffstat (limited to 'lib/mauve/server.rb')
-rw-r--r-- | lib/mauve/server.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/mauve/server.rb b/lib/mauve/server.rb index 138636e..eb5872b 100644 --- a/lib/mauve/server.rb +++ b/lib/mauve/server.rb @@ -65,6 +65,10 @@ module Mauve @initial_sleep = s end + def in_initial_sleep? + Time.now < self.started_at + self.initial_sleep + end + def logger @logger ||= Log4r::Logger.new(self.class.to_s) end @@ -92,7 +96,8 @@ module Mauve # m.auto_migrate! if m.respond_to?("auto_migrate!") end - Mauve::AlertEarliestDate.create_view! + AlertHistory.migrate! + AlertEarliestDate.create_view! return nil end |