Major improvement in container fetching. ToDo: Check how much stress this puts on the docker daemon (I assume it is not that much).

+ some more rescue code (in return container) as well as logging fixes.
This commit is contained in:
Ralf Teusner
2015-11-28 16:20:16 +01:00
parent ae9cfaebf8
commit 6170068f24
2 changed files with 29 additions and 5 deletions

View File

@ -304,7 +304,12 @@ class DockerClient
def self.return_container(container, execution_environment)
Rails.logger.debug('returning container ' + container.to_s)
clean_container_workspace(container)
begin
clean_container_workspace(container)
rescue Docker::Error::NotFoundError => error
Rails.logger.info('return_container: Rescued from Docker::Error::NotFoundError: ' + error.to_s)
Rails.logger.info('Nothing is done here additionally. The container will be exchanged upon its next retrieval.')
end
DockerContainerPool.return_container(container, execution_environment)
container.status = :returned
end