DCP: Prevent double deletion of runner
This commit is contained in:
@ -135,6 +135,8 @@ class Runner::Connection
|
|||||||
|
|
||||||
case @status
|
case @status
|
||||||
when :timeout
|
when :timeout
|
||||||
|
# The runner will destroyed. For the DockerContainerPool, this mechanism is necessary.
|
||||||
|
# However, it might not be required for Poseidon.
|
||||||
@strategy.destroy_at_management
|
@strategy.destroy_at_management
|
||||||
@error = Runner::Error::ExecutionTimeout.new('Execution exceeded its time limit')
|
@error = Runner::Error::ExecutionTimeout.new('Execution exceeded its time limit')
|
||||||
when :terminated_by_codeocean, :terminated_by_management
|
when :terminated_by_codeocean, :terminated_by_management
|
||||||
|
@ -90,7 +90,6 @@ class Runner::Strategy::DockerContainerPool < Runner::Strategy
|
|||||||
end
|
end
|
||||||
rescue Timeout::Error
|
rescue Timeout::Error
|
||||||
socket.close(:timeout)
|
socket.close(:timeout)
|
||||||
destroy_at_management
|
|
||||||
end
|
end
|
||||||
socket
|
socket
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user