projects
/
chef.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
turn on dribble replication
[chef.git]
/
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 837f4af4dfa9d865ea1e8146e49705ce032bcd10..03a51318af104e55c6e2f8847c67885925a75e24 100644
(file)
--- a/
cookbooks/nominatim/templates/default/nominatim-daily-maintenance.erb
+++ b/
cookbooks/nominatim/templates/default/nominatim-daily-maintenance.erb
@@
-1,10
+1,19
@@
# DO NOT EDIT - This file is being maintained by Chef
# DO NOT EDIT - This file is being maintained by Chef
-nominatim refresh --postcodes --word-tokens --threads 4 -v
+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[: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
if python3 cli.py --execute-all; then
+<% end -%>
rm -rf "<%= @qadatadir %>/old"
if [ -d "<%= @qadatadir %>/current" ]; then
mv "<%= @qadatadir %>/current" "<%= @qadatadir %>/old"
rm -rf "<%= @qadatadir %>/old"
if [ -d "<%= @qadatadir %>/current" ]; then
mv "<%= @qadatadir %>/current" "<%= @qadatadir %>/old"