From e33575964479858d4e9f191a3421e55e587bb8a0 Mon Sep 17 00:00:00 2001 From: Ralf Teusner Date: Wed, 2 Dec 2015 16:00:31 +0100 Subject: [PATCH] accessor methods for the container and all_container arrays hashes (in order to watch it with the rails console) --- lib/docker_container_pool.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/docker_container_pool.rb b/lib/docker_container_pool.rb index 02a3fb12..1d02876f 100644 --- a/lib/docker_container_pool.rb +++ b/lib/docker_container_pool.rb @@ -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))