X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/e8be2915501c7061362d00e05befdd91d6e39fe8..fb1f1d56e8d8a6a86b79c71546e6c114fec2640c:/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..7757386c5 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