Reuse runners per user and execution environment
Co-authored-by: Jan-Eric Hellenberg <jan-eric.hellenberg@student.hpi.uni-potsdam.de> Co-authored-by: Maximilian Pass <maximilian.pass@student.hpi.uni-potsdam.de>
This commit is contained in:

committed by
Sebastian Serth

parent
3017e46006
commit
17bd2d8726
@ -195,11 +195,10 @@ class Submission < ApplicationRecord
|
||||
|
||||
def prepared_runner
|
||||
request_time = Time.now
|
||||
runner = Runner.new(execution_environment, execution_environment.permitted_execution_time)
|
||||
runner = Runner.for(user, exercise, execution_environment.permitted_execution_time)
|
||||
copy_files_to runner
|
||||
runner.waiting_time = Time.now - request_time
|
||||
yield(runner) if block_given?
|
||||
runner.destroy
|
||||
end
|
||||
|
||||
def command_for(template, file)
|
||||
|
Reference in New Issue
Block a user