accessor methods for the container and all_container arrays hashes (in order to watch it with the rails console)

This commit is contained in:
Ralf Teusner
2015-12-02 16:00:31 +01:00
parent 12f52c0cfc
commit e335759644

View File

@ -18,6 +18,14 @@ class DockerContainerPool
@config ||= CodeOcean::Config.new(:docker).read(erb: true)[:pool]
end
def self.containers
@containers
end
def self.all_containers
@all_containers
end
def self.remove_from_all_containers(container, execution_environment)
@all_containers[execution_environment.id]-=[container]
if(@containers[execution_environment.id].include?(container))