Add execute_command method to runner.rb

* This is now used by the score and test runs
* This also re-enables the interactive shell for execution environments
This commit is contained in:
Sebastian Serth
2021-10-19 22:53:27 +02:00
parent 02a2673bf2
commit d87e23b9a3
6 changed files with 60 additions and 43 deletions

View File

@ -30,8 +30,9 @@ class ExecutionEnvironmentsController < ApplicationController
end
def execute_command
@docker_client = DockerClient.new(execution_environment: @execution_environment)
render(json: @docker_client.execute_arbitrary_command(params[:command]))
runner = Runner.for(current_user, @execution_environment)
output = runner.execute_command(params[:command])
render(json: output)
end
def working_time_query