Class: Wakame::ClusterManager::ClusterConfigLoader
- Inherits:
-
Object
- Object
- Wakame::ClusterManager::ClusterConfigLoader
- Defined in:
- lib/wakame/master.rb
Instance Method Summary collapse
Instance Method Details
#load(cluster_rb_path = Wakame.config.cluster_config_path) ⇒ Object
171 172 173 174 175 176 177 178 179 180 181 182 183 |
# File 'lib/wakame/master.rb', line 171 def load(cluster_rb_path=Wakame.config.cluster_config_path) Wakame.log.info("#{self.class}: Loading cluster.rb: #{cluster_rb_path}") @loaded_cluster_names = {} eval(File.readlines(cluster_rb_path).join(''), binding) # Clear uninitialized cluster data in the store. Service::ServiceCluster.find_all.each { |cluster| cluster.delete unless @loaded_cluster_names.has_key?(cluster.name) } @loaded_cluster_names end |