lib/cap-rightscale/configuration/rightscale.rb in cap-rightscale-0.2.2 vs lib/cap-rightscale/configuration/rightscale.rb in cap-rightscale-0.2.3

- old
+ new

@@ -72,17 +72,17 @@ logger.info("Found server: #{hostname}(#{ip})") enable_hostname ? hostname : ip end host_list.delete(nil) -puts "Time: #{Time.now - start}" + if host_list && host_list.size > 0 role(role, params) { host_list } dump_server_cache(role, host_list) # Dump cache end end - +puts "Time: #{Time.now - start}" host_list || [] end # Get servers in deployment # === Parameters @@ -129,17 +129,17 @@ logger.info("Found server: #{hostname}(#{ip})") enable_hostname ? hostname : ip end host_list.delete(nil) -puts "Time: #{Time.now - start}" + if host_list && host_list.size > 0 role(role, params) { host_list } dump_server_cache(role, host_list) # Dump cache end end - +puts "Time: #{Time.now - start}" host_list || [] end # Get servers matching tags in deployment # === Parameters @@ -198,16 +198,16 @@ logger.info("Found server: #{hostname}(#{ip})") enable_hostname ? hostname : ip end host_list.delete(nil) end -puts "Time: #{Time.now - start}" + if host_list && host_list.size > 0 role(role, params) { host_list } dump_server_cache(role, host_list) # Dump cache end end - +puts "Time: #{Time.now - start}" host_list || [] end private def get_array(id)