X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/10016dc5c3a7c567b22406429cc9efbe335881e3..8724d4f9c9bf439e5dc28a05f04c1a80ca7498c4:/cookbooks/tilecache/templates/default/ohai.rb.erb diff --git a/cookbooks/tilecache/templates/default/ohai.rb.erb b/cookbooks/tilecache/templates/default/ohai.rb.erb index 6bf8fc754..5647a4528 100644 --- a/cookbooks/tilecache/templates/default/ohai.rb.erb +++ b/cookbooks/tilecache/templates/default/ohai.rb.erb @@ -8,7 +8,7 @@ Ohai.plugin(:TileCache) do # Find performance reports for last few minutes # Add up total time taken to download tile grouped by remote server # Remove 1 second per successful time report (de-prioritise new servers) - # Add 30 seconds per failed time report request + # Add 10 seconds per failed time report request Dir.glob("/srv/tilecache/data/**/tilecache-*.txt").each do |path| if File.mtime(path) > recent IO.readlines(path).reverse.take(20).each do |sample| @@ -18,9 +18,9 @@ Ohai.plugin(:TileCache) do host = Regexp.last_match(3) if status == 200 then - times[host] = times.fetch(host, 0) + time - 1 + times[host] = times.fetch(host, 0) + (time + 1) * (time + 1) - 1 else - times[host] = times.fetch(host, 0) + 30 + times[host] = times.fetch(host, 0) + 10 end end end