File tree 2 files changed +8
-2
lines changed
test/models/batch_connect
2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,10 @@ def get_binding
31
31
# @return [Integer] created at
32
32
attr_accessor :created_at
33
33
34
+ # When this session finished, as a unix timestamp
35
+ # @return [Integer] completed at
36
+ attr_accessor :completed_at
37
+
34
38
# Token describing app and sub app
35
39
# @return [String] app token
36
40
attr_accessor :token
@@ -87,7 +91,7 @@ def app
87
91
# Attributes used for serialization
88
92
# @return [Hash] attributes to be serialized
89
93
def attributes
90
- %w( id cluster_id job_id created_at token title script_type cache_completed ) . map do |attribute |
94
+ %w( id cluster_id job_id created_at token title script_type cache_completed completed_at ) . map do |attribute |
91
95
[ attribute , nil ]
92
96
end . to_h
93
97
end
@@ -421,6 +425,7 @@ def update_info
421
425
def update_cache_completed!
422
426
if ( ! cache_completed ) && completed?
423
427
self . cache_completed = true
428
+ self . completed_at = Time . now . to_i
424
429
db_file . write ( to_json )
425
430
end
426
431
end
Original file line number Diff line number Diff line change @@ -551,7 +551,8 @@ def completed?
551
551
'token' => 'bc_jupyter' ,
552
552
'title' => 'Jupyter Notebook' ,
553
553
'script_type' => 'basic' ,
554
- 'cache_completed' => nil
554
+ 'cache_completed' => nil ,
555
+ 'completed_at' => nil
555
556
}
556
557
Timecop . freeze ( now ) do
557
558
assert session . save ( app : bc_jupyter_app , context : ctx ) , session . errors . each ( &:to_s ) . to_s
You can’t perform that action at this time.
0 commit comments