X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/05fef779d7706cd3db12d78ff82d88e6b994347c..0d8030b3a7ec9eaa6bc96c7dd39d835a00a7ace0:/cookbooks/tile/templates/default/replicate.erb?ds=sidebyside diff --git a/cookbooks/tile/templates/default/replicate.erb b/cookbooks/tile/templates/default/replicate.erb index 8ebfd94a5..81fc66419 100644 --- a/cookbooks/tile/templates/default/replicate.erb +++ b/cookbooks/tile/templates/default/replicate.erb @@ -60,8 +60,17 @@ do # No need to rollback now rm sequence-prev.txt + # Get buffer count + buffers=$(osmium fileinfo --extended --get=data.buffers.count ${file}) + + # If this diff has content mark it as the latest diff + if [ $buffers -gt 0 ] + then + ln -f ${file} changes-latest.osc.gz + fi + # Queue these changes for expiry processing - ln ${file} expire-queue/$file + ln ${file} expire-queue/${file} # Delete old downloads find . -name 'changes-*.gz' -mmin +300 -exec rm -f {} \;