From: Tom Hughes Date: Sat, 6 May 2023 15:56:20 +0000 (+0100) Subject: Update taginfo databases atomically X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/9d45e7f9612e5ae27ef0d1ae95f6d4e6534dfb77 Update taginfo databases atomically Closes #588 --- diff --git a/cookbooks/taginfo/templates/default/update.erb b/cookbooks/taginfo/templates/default/update.erb index caad71353..f2d1dde59 100644 --- a/cookbooks/taginfo/templates/default/update.erb +++ b/cookbooks/taginfo/templates/default/update.erb @@ -15,8 +15,8 @@ fi $ROOT/taginfo/sources/update_all.sh $ROOT/sources -mv $ROOT/data/taginfo-* $ROOT/data/old -mv $ROOT/sources/taginfo-*.db $ROOT/sources/*/taginfo-*.db $ROOT/data +ln -f $ROOT/data/taginfo-* $ROOT/data/old +mv -f $ROOT/sources/taginfo-*.db $ROOT/sources/*/taginfo-*.db $ROOT/data mv $ROOT/sources/download/* $ROOT/download PASSENGER_INSTANCE_REGISTRY_DIR=<%= node[:passenger][:instance_registry_dir] %> /usr/bin/passenger-config restart-app $ROOT/taginfo/web > /dev/null