From dca9aff59c1ecd82f2f17c1a91b5eebed19700f7 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Sat, 30 Jan 2021 16:51:11 +0100 Subject: [PATCH 1/1] nominatim: switch to using nominatim tool --- .../nominatim/templates/default/git-post-merge-hook.erb | 4 +--- cookbooks/nominatim/templates/default/updater.erb | 8 ++++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/cookbooks/nominatim/templates/default/git-post-merge-hook.erb b/cookbooks/nominatim/templates/default/git-post-merge-hook.erb index 9c20abaca..fc806f1b4 100644 --- a/cookbooks/nominatim/templates/default/git-post-merge-hook.erb +++ b/cookbooks/nominatim/templates/default/git-post-merge-hook.erb @@ -13,7 +13,5 @@ make psql -d <%= @dbname %> -c "SELECT version();" >/dev/null 2>&1 if [[ "$?" == "0" ]]; then - ./utils/setup.php --create-functions --create-partition-functions --enable-diff-updates - ./utils/setup.php --setup-website - ./utils/update.php --update-address-levels + ./nominatim refresh --functions --address-levels --website fi diff --git a/cookbooks/nominatim/templates/default/updater.erb b/cookbooks/nominatim/templates/default/updater.erb index ade5845aa..37cf89372 100644 --- a/cookbooks/nominatim/templates/default/updater.erb +++ b/cookbooks/nominatim/templates/default/updater.erb @@ -17,12 +17,12 @@ do if [[ $current_load -lt $num_cpus ]] then - INST=2 + INST=4 else - INST=1 + INST=2 fi - ./utils/update.php --import-osmosis --index-instances $INST + ./nominatim replication --once --threads $INST <% if node[:nominatim][:enable_git_updates] -%> pushd <%= @srcdir %> @@ -37,6 +37,6 @@ do if [ -f "<%= @update_maintenance_trigger %>" ]; then rm <%= @update_maintenance_trigger %> - ./utils/update.php --calculate-postcodes + ./nominatim refresh --postcodes fi done -- 2.39.5