summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaku Ytti <saku@ytti.fi>2017-01-01 11:35:16 +0200
committerSaku Ytti <saku@ytti.fi>2017-01-01 11:35:16 +0200
commit5ee54cb50248c3b1cc93c5b83ed0cdbba7f13adb (patch)
treea842104db4427866cd477a5935584121d52d9830
parent464f3fbb74ed6ca07a89216cd83d9b88c4f72924 (diff)
prevent Node#last from keeping Job reference
Should halve Job's in memory
-rw-r--r--lib/oxidized/node.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/oxidized/node.rb b/lib/oxidized/node.rb
index b13ce0e..5727eef 100644
--- a/lib/oxidized/node.rb
+++ b/lib/oxidized/node.rb
@@ -106,10 +106,10 @@ module Oxidized
def last= job
if job
ostruct = OpenStruct.new
- ostruct.start = job.start
- ostruct.end = job.end
- ostruct.status = job.status
- ostruct.time = job.time
+ ostruct.start = job.start.dup
+ ostruct.end = job.end.dup
+ ostruct.status = job.status.dup
+ ostruct.time = job.time.dup
@last = ostruct
else
@last = nil