]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/tile/templates/default/cleanup-tiles.erb
Block requests for tiles unless they come from a CDN node
[chef.git] / cookbooks / tile / templates / default / cleanup-tiles.erb
index 7f4904743afb666f8f67869c6d7d9398cc3ff0c9..721660bb16795b234bf5779c91e76b099578f11d 100644 (file)
@@ -18,9 +18,9 @@ $lockmgr->lock("${tiledir}/cleanup") || exit 0;
 
 my $tempfile = tmpnam();
 
-if (df($tiledir)->{per} > 90)
+if (df($tiledir)->{per} > 88)
 {
-    system("find", $tiledir, "-xdev", "-name", "lost+found", "-prune", "-o", "-type", "f", "-name", "*.meta", "-atime", "+5", "-fprintf", $tempfile, "%A@ %p\n");
+    system("find", $tiledir, "-xdev", "-name", "lost+found", "-prune", "-o", "-type", "f", "-name", "*.meta", "-atime", "+2", "-fprintf", $tempfile, "%A@ %p\n");
 
     open(TILES, "-|", "sort", "-n", $tempfile) || die "Can't open $tempfile: $!";