Implement A/B Test for using AWS as an executor for Java

This commit is contained in:
Sebastian Serth
2022-04-15 14:55:37 +02:00
parent 9d9570b26b
commit 4887f4af02
3 changed files with 44 additions and 1 deletions

View File

@ -195,7 +195,8 @@ class Submission < ApplicationRecord
def prepared_runner
request_time = Time.zone.now
begin
runner = Runner.for(user, exercise.execution_environment)
execution_environment = AwsStudy.get_execution_environment(user, exercise)
runner = Runner.for(user, execution_environment)
files = collect_files
files.reject!(&:teacher_defined_assessment?) if cause == 'run'
Rails.logger.debug { "#{Time.zone.now.getutc.inspect}: Copying files to Runner #{runner.id} for #{user_type} #{user_id} and Submission #{id}." }