Attach duration information to the exception object
This commit is contained in:

committed by
Sebastian Serth

parent
36578a2817
commit
2dff81a510
@ -41,7 +41,14 @@ class Runner < ApplicationRecord
|
||||
end
|
||||
|
||||
def attach_to_execution(command, &block)
|
||||
@strategy.attach_to_execution(command, &block)
|
||||
starting_time = Time.zone.now
|
||||
begin
|
||||
@strategy.attach_to_execution(command, &block)
|
||||
rescue Runner::Error => e
|
||||
e.execution_duration = Time.zone.now - starting_time
|
||||
raise
|
||||
end
|
||||
Time.zone.now - starting_time # execution duration
|
||||
end
|
||||
|
||||
def destroy_at_management
|
||||
|
Reference in New Issue
Block a user