Exclude first balancer from backup

This commit is contained in:
vic 2013-02-28 04:20:18 +04:00
parent e4c25d4a85
commit de991a7760

View File

@ -1,6 +1,6 @@
<% for @host in @balancers.keys.sort %>server <%= @host %> <%= @balancers[@host] %>:<%= balancer_port %> <%
items = balancermember_options
items = [items] unless balancermember_options.instance_of? Array
items.each do |item| %> <% if @define_cookies == true %> cookie <%= @host %> <% end %> <%= item %> <% if @define_backend == true %> backup <% end %> <% end %>
items.each do |item| %> <% if @define_cookies == true %> cookie <%= @host %> <% end %> <%= item %> <% if @define_backend == true and @balancers.keys.first != @host %> backup <% end %> <% end %>
<% end -%>