Some comments and cleanup of exercise.rb percentage calculation
This commit is contained in:
@ -96,8 +96,9 @@ class DockerClient
|
||||
#Rails.logger.info "docker_client: self.create_container with creation options:"
|
||||
#Rails.logger.info(container_creation_options(execution_environment))
|
||||
container = Docker::Container.create(container_creation_options(execution_environment))
|
||||
# container.start sometimes creates the passed local_workspace_path on disk (depending on the setup).
|
||||
# this is however not guaranteed and caused issues on the server already. Therefore create the necessary folders manually!
|
||||
local_workspace_path = generate_local_workspace_path
|
||||
# container.start always creates the passed local_workspace_path on disk. Seems like we have to live with that, therefore we can also just create the empty folder ourselves.
|
||||
FileUtils.mkdir(local_workspace_path)
|
||||
container.start(container_start_options(execution_environment, local_workspace_path))
|
||||
container.start_time = Time.now
|
||||
|
@ -48,6 +48,7 @@ class DockerContainerPool
|
||||
end
|
||||
|
||||
def self.create_container(execution_environment)
|
||||
Rails.logger.info('trying to create container for execution environment: ' + execution_environment.to_s)
|
||||
container = DockerClient.create_container(execution_environment)
|
||||
container.status = 'available'
|
||||
#Rails.logger.debug('created container ' + container.to_s + ' for execution environment ' + execution_environment.to_s)
|
||||
|
Reference in New Issue
Block a user