diff options
author | Alex Legler <alex@a3li.li> | 2014-01-11 12:36:54 +0100 |
---|---|---|
committer | Alex Legler <alex@a3li.li> | 2014-01-11 12:36:54 +0100 |
commit | 0952551f589a8b410fdc60eaa971e8fe62d09bb8 (patch) | |
tree | eabb1b831e43cf774edd770a4965a1cc2211b458 /lib | |
parent | Properly clear the ServiceRegistry cache (diff) | |
download | infra-status-0952551f589a8b410fdc60eaa971e8fe62d09bb8.tar.gz infra-status-0952551f589a8b410fdc60eaa971e8fe62d09bb8.tar.bz2 infra-status-0952551f589a8b410fdc60eaa971e8fe62d09bb8.zip |
Display cache times
Diffstat (limited to 'lib')
-rw-r--r-- | lib/helpers.rb | 6 | ||||
-rw-r--r-- | lib/notice_store.rb | 1 | ||||
-rw-r--r-- | lib/service_registry.rb | 1 |
3 files changed, 7 insertions, 1 deletions
diff --git a/lib/helpers.rb b/lib/helpers.rb index 2f613b1..aaaf632 100644 --- a/lib/helpers.rb +++ b/lib/helpers.rb @@ -81,6 +81,10 @@ helpers do end def date_format(date) - date.rfc2822 + if date.nil? + 'n/a' + else + date.rfc2822 + end end end
\ No newline at end of file diff --git a/lib/notice_store.rb b/lib/notice_store.rb index efd98f6..77b1edc 100644 --- a/lib/notice_store.rb +++ b/lib/notice_store.rb @@ -7,6 +7,7 @@ require 'singleton' class NoticeStore include Singleton CACHE_SECONDS = 600 + attr_reader :load_date def initialize update! diff --git a/lib/service_registry.rb b/lib/service_registry.rb index 3521fce..7ac5f85 100644 --- a/lib/service_registry.rb +++ b/lib/service_registry.rb @@ -71,6 +71,7 @@ class ServiceRegistry include Singleton include HelperMethods + attr_reader :load_date def initialize end |