X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/827477f709bcc1a8449b6c07b39509fe050c1077..54817d1f97d837a7b740c805661388a03b8ffe22:/cookbooks/nominatim/templates/default/nominatim-daily-maintenance.erb diff --git a/cookbooks/nominatim/templates/default/nominatim-daily-maintenance.erb b/cookbooks/nominatim/templates/default/nominatim-daily-maintenance.erb index a7ede5bcb..03a51318a 100644 --- a/cookbooks/nominatim/templates/default/nominatim-daily-maintenance.erb +++ b/cookbooks/nominatim/templates/default/nominatim-daily-maintenance.erb @@ -1,11 +1,19 @@ # DO NOT EDIT - This file is being maintained by Chef -nominatim refresh --postcodes --word-tokens --threads 4 -v -nominatim admin --clean-deleted '1 month' +cd <%= @projectdir %> + +<%= @venvprefix %>nominatim refresh --postcodes --word-tokens --threads 4 -v +<%= @venvprefix %>nominatim admin --clean-deleted '1 month' + +psql -q -d <%= node[:nominatim][:dbname] %> -c 'VACUUM ANALYSE search_name' <% if node[:nominatim][:enable_qa_tiles] -%> pushd <%= @qabindir %> +<% if node.platform?("debian") -%> +if <%= @venvprefix %>nominatim-data-analyser --execute-all --config=<%= @projectdir %>/qa-config.yaml; then +<% else -%> if python3 cli.py --execute-all; then +<% end -%> rm -rf "<%= @qadatadir %>/old" if [ -d "<%= @qadatadir %>/current" ]; then mv "<%= @qadatadir %>/current" "<%= @qadatadir %>/old"