]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/tile/templates/default/replicate.erb
Increase readahead on virtio block devices
[chef.git] / cookbooks / tile / templates / default / replicate.erb
index 8ebfd94a55ecfce888b4fdc8daf619831dcacdf7..81fc66419e153fa5e4e7970bae7b816ff02c3553 100644 (file)
@@ -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 {} \;