X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/23b6f6fb29fba9c2a7f9e6d9bf8d1ece35bc66f2..b7a7d93d6d9850c5ace31735c6a773e614f7d017:/cookbooks/tile/templates/default/cleanup-tiles.erb diff --git a/cookbooks/tile/templates/default/cleanup-tiles.erb b/cookbooks/tile/templates/default/cleanup-tiles.erb index 0f9bff288..eebcd41a4 100644 --- a/cookbooks/tile/templates/default/cleanup-tiles.erb +++ b/cookbooks/tile/templates/default/cleanup-tiles.erb @@ -11,9 +11,9 @@ use LockFile::Simple; my $tiledir = shift @ARGV; -my $lockmgr = LockFile::Simple->make(-autoclean => 1, -max => 0, -warn => 0); +my $lockmgr = LockFile::Simple->make(-autoclean => 1, -max => 1, -hold => 0, -warn => 0); -$lockmgr->lock($tiledir) || exit 0; +$lockmgr->lock("${tiledir}/cleanup") || exit 0; my $tempfile = tmpnam(); @@ -51,6 +51,6 @@ if (df($tiledir)->{per} > 90) unlink($tempfile); -$lockmgr->unlock($tiledir); +$lockmgr->unlock("${tiledir}/cleanup"); exit 0;