X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/3a4d52bd4c0f8e6ae7679145846b7bc7845d8ace..9bca5f05185dde08efcf2d5f1a2bf66c8cdc9f00:/cookbooks/tile/files/default/ruby/expire.rb diff --git a/cookbooks/tile/files/default/ruby/expire.rb b/cookbooks/tile/files/default/ruby/expire.rb index c6916943a..f99d646e0 100755 --- a/cookbooks/tile/files/default/ruby/expire.rb +++ b/cookbooks/tile/files/default/ruby/expire.rb @@ -126,13 +126,14 @@ module Expire node_cache = NodeCache.new(NODE_CACHE_FILE) doc.find('//way/nd').each do |node| node_id = node['ref'].to_i - unless nodes.include? node_id - # this is a node referenced but not added, modified or deleted, so it should - # still be in the node cache. - if entry = node_cache[node_id] - point = Proj4::Point.new(entry.lon, entry.lat) - nodes[node_id] = tile_from_merc(point, max_zoom) - end + + next if nodes.include? node_id + + # this is a node referenced but not added, modified or deleted, so it should + # still be in the node cache. + if (entry = node_cache[node_id]) + point = Proj4::Point.new(entry.lon, entry.lat) + nodes[node_id] = tile_from_merc(point, max_zoom) end end