re-enable data submission via shared folders.
This commit is contained in:
@ -21,14 +21,14 @@ class DockerClient
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.clean_container_workspace(container)
|
def self.clean_container_workspace(container)
|
||||||
container.exec(['bash', '-c', 'rm -rf ' + CONTAINER_WORKSPACE_PATH + '/*'])
|
# remove files when using transferral via Docker API archive_in (transmit)
|
||||||
=begin
|
#container.exec(['bash', '-c', 'rm -rf ' + CONTAINER_WORKSPACE_PATH + '/*'])
|
||||||
|
|
||||||
local_workspace_path = local_workspace_path(container)
|
local_workspace_path = local_workspace_path(container)
|
||||||
if local_workspace_path && Pathname.new(local_workspace_path).exist?
|
if local_workspace_path && Pathname.new(local_workspace_path).exist?
|
||||||
Pathname.new(local_workspace_path).children.each{ |p| p.rmtree}
|
Pathname.new(local_workspace_path).children.each{ |p| p.rmtree}
|
||||||
#FileUtils.rmdir(Pathname.new(local_workspace_path))
|
#FileUtils.rmdir(Pathname.new(local_workspace_path))
|
||||||
end
|
end
|
||||||
=end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def command_substitutions(filename)
|
def command_substitutions(filename)
|
||||||
@ -295,7 +295,7 @@ class DockerClient
|
|||||||
Run commands by attaching a websocket to Docker.
|
Run commands by attaching a websocket to Docker.
|
||||||
"""
|
"""
|
||||||
command = submission.execution_environment.run_command % command_substitutions(filename)
|
command = submission.execution_environment.run_command % command_substitutions(filename)
|
||||||
create_workspace_files = proc { create_workspace_files_transmit(container, submission) }
|
create_workspace_files = proc { create_workspace_files(container, submission) }
|
||||||
execute_websocket_command(command, create_workspace_files, block)
|
execute_websocket_command(command, create_workspace_files, block)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -304,7 +304,7 @@ class DockerClient
|
|||||||
Stick to existing Docker API with exec command.
|
Stick to existing Docker API with exec command.
|
||||||
"""
|
"""
|
||||||
command = submission.execution_environment.test_command % command_substitutions(filename)
|
command = submission.execution_environment.test_command % command_substitutions(filename)
|
||||||
create_workspace_files = proc { create_workspace_files_transmit(container, submission) }
|
create_workspace_files = proc { create_workspace_files(container, submission) }
|
||||||
execute_command(command, create_workspace_files, block)
|
execute_command(command, create_workspace_files, block)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user