diff options
Diffstat (limited to 'lib/oxidized/node.rb')
-rw-r--r-- | lib/oxidized/node.rb | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/oxidized/node.rb b/lib/oxidized/node.rb index 0f4c525..20aab76 100644 --- a/lib/oxidized/node.rb +++ b/lib/oxidized/node.rb @@ -95,12 +95,16 @@ module Oxidized end def last= job - ostruct = OpenStruct.new - ostruct.start = job.start - ostruct.end = job.end - ostruct.status = job.status - ostruct.time = job.time - @last = ostruct + if job + ostruct = OpenStruct.new + ostruct.start = job.start + ostruct.end = job.end + ostruct.status = job.status + ostruct.time = job.time + @last = ostruct + else + @last = nil + end end def reset |