Merge remote-tracking branch 'origin/master' into exercise-anomaly-detection
# Conflicts: # Gemfile.lock
This commit is contained in:
@@ -75,6 +75,11 @@ class SubmissionsController < ApplicationController
|
||||
zio.write(file.content)
|
||||
end
|
||||
|
||||
# zip exercise description
|
||||
zio.put_next_entry(t('activerecord.models.exercise.one') + '.txt')
|
||||
zio.write(@submission.exercise.title + "\r\n======================\r\n")
|
||||
zio.write(@submission.exercise.description)
|
||||
|
||||
# zip .co file
|
||||
zio.put_next_entry(".co")
|
||||
zio.write(File.read id_file)
|
||||
@@ -167,7 +172,7 @@ class SubmissionsController < ApplicationController
|
||||
# if the command is 'client_kill', send it to docker otherwise.
|
||||
begin
|
||||
parsed = JSON.parse(data)
|
||||
if parsed['cmd'] == 'client_kill'
|
||||
if parsed.class == Hash && parsed['cmd'] == 'client_kill'
|
||||
Rails.logger.debug("Client exited container.")
|
||||
@docker_client.kill_container(result[:container])
|
||||
else
|
||||
|
Reference in New Issue
Block a user