Integrate new API with websocket (run only)

Co-authored-by: Felix Auringer <felix.auringer@student.hpi.uni-potsdam.de>
This commit is contained in:
Konrad Hanff
2021-03-30 14:15:00 +02:00
committed by Sebastian Serth
parent 2e2cd1855e
commit 3cf70a33d8
3 changed files with 63 additions and 75 deletions

View File

@ -146,10 +146,12 @@ class Submission < ApplicationRecord
run_command = command_for execution_environment.run_command, file
container = run_command_with_self run_command
container
yield(container.socket) if block_given?
container.destroy
end
def run_command_with_self(command)
container = Container.new(execution_environment)
container = Container.new(execution_environment, execution_environment.permitted_execution_time)
container.copy_submission_files self
container.execute_command_interactively(command)
container