]> git.openstreetmap.org Git - chef.git/commitdiff
Use python 3 for the planet notes dump
authorTom Hughes <tom@compton.nu>
Mon, 18 May 2020 19:13:28 +0000 (19:13 +0000)
committerTom Hughes <tom@compton.nu>
Mon, 18 May 2020 19:14:19 +0000 (20:14 +0100)
cookbooks/planet/recipes/notes.rb
cookbooks/planet/templates/default/planet-notes-dump.erb

index 3b22af7397ecf2cbe077eccb1d21eee3019c0fb1..68a548b1554a6b75219dfab41c5f8f17dde76ab4 100644 (file)
@@ -23,8 +23,9 @@ db_passwords = data_bag_item("db", "passwords")
 
 package %w[
   pbzip2
 
 package %w[
   pbzip2
-  python-psycopg2
-  python-lxml
+  python3
+  python3-psycopg2
+  python3-lxml
 ]
 
 directory "/opt/planet-notes-dump" do
 ]
 
 directory "/opt/planet-notes-dump" do
index 92ca8b3758ec1313c4f366a515c14d77d5c8b105..77c73348f3755939a9d0ed9b15ea702b00f5b3cf 100644 (file)
@@ -33,7 +33,7 @@ if [ \! -d ${planet_dir}/notes/ ]
 if [ \! -d ${planet_dir}/notes/${cur_year}/ ]; then mkdir ${planet_dir}/notes/${cur_year}/; fi
 cd ${planet_dir}/notes/${cur_year}/
 
 if [ \! -d ${planet_dir}/notes/${cur_year}/ ]; then mkdir ${planet_dir}/notes/${cur_year}/; fi
 cd ${planet_dir}/notes/${cur_year}/
 
-/usr/bin/python /opt/planet-notes-dump/dump.py --quiet --database openstreetmap --host <%= node[:web][:readonly_database_host] %> --user planetdump --password '<%= @password %>' .${cur_planet_notes}
+/usr/bin/python3 /opt/planet-notes-dump/dump.py --quiet --database openstreetmap --host <%= node[:web][:readonly_database_host] %> --user planetdump --password '<%= @password %>' .${cur_planet_notes}
 pbzip2 -p6 -9 .${cur_planet_notes}
 
 planet_notes_size=$(du -sb .${cur_planet_notes}.bz2 | awk '{ print $1 }')
 pbzip2 -p6 -9 .${cur_planet_notes}
 
 planet_notes_size=$(du -sb .${cur_planet_notes}.bz2 | awk '{ print $1 }')