From: User for running Openstreetmap-things Date: Sun, 5 Jun 2016 20:58:06 +0000 (+0200) Subject: remove expiryfile when rendering is disabled, else it grows indefinitely and causes... X-Git-Url: http://git.rrze.uni-erlangen.de/gitweb/?a=commitdiff_plain;h=c5981eb1569babd0456e16127e4e298dd59f944f;p=osmrrze.git remove expiryfile when rendering is disabled, else it grows indefinitely and causes tens of thousands of rendering requests the moment we turn rerendering back on. --- diff --git a/scripts/doosmupdate.sh b/scripts/doosmupdate.sh index eadb5c8..3ebe00b 100755 --- a/scripts/doosmupdate.sh +++ b/scripts/doosmupdate.sh @@ -12,8 +12,9 @@ WEBSTATEFILE=/var/www/lastdbupdate.txt UPDATECMD="/usr/bin/osm2pgsql --slim --cache=8000 --append --database=osm \ --style=/home.local/osm/dbstyle/osm2pgsql-new.style \ --flat-nodes=/mnt/database/flatnodes/flatnodes.db \ - --hstore --multi-geometry --expire-tiles=17-17 \ - --expire-output=$EXPIRYFILE $CHANGESFILE" + --hstore --multi-geometry \ + --expire-tiles=17-17 --expire-output=$EXPIRYFILE \ + $CHANGESFILE" cleanup() { @@ -70,19 +71,23 @@ grep timestamp $OSMOSISWORKDIR/state.txt | sed -e 's/timestamp=//g' -e 's/T/ /g' echo -n "Updated database: now at upstream state of " cat $WEBSTATEFILE #touch /var/lib/tirex/tiles/planet-import-complete -if [ -e $EXPIRYFILE -a -e $RERENDEREXPIREDTRIGGERFILE ] ; then - echo "Expiryfile exists. Telling tirex to rerender the tiles mentioned there..." - echo "Number of lines: `wc -l $EXPIRYFILE`" - # Used to be zoom 13-20 but that causes too much load. Reduced to 15-20. - # Trying completely without. Lots of load, way too many false positives. -unrz191 2015-09-04 - cat $EXPIRYFILE | /home.local/osm/bin/osmtilecleanup.pl \ +if [ -e $EXPIRYFILE ] ; then + if [ -e $RERENDEREXPIREDTRIGGERFILE ] ; then + echo "Expiryfile and triggerfile exists. Telling tirex to rerender the tiles mentioned there..." + echo "Number of lines: `wc -l $EXPIRYFILE`" + # Used to be zoom 13-20 but that causes too much load. Reduced to 15-20. + # Trying completely without. Lots of load, way too many false positives. -unrz191 2015-09-04 + cat $EXPIRYFILE | /home.local/osm/bin/osmtilecleanup.pl \ --action rerenderexpiredlist --zoom 15-20 \ --rrs /home.local/osm/bin/osmrerenderwrapper.sh \ /var/lib/tirex/tiles/osm - cat $EXPIRYFILE | /home.local/osm/bin/osmtilecleanup.pl \ + cat $EXPIRYFILE | /home.local/osm/bin/osmtilecleanup.pl \ --action rerenderexpiredlist --zoom 15-20 \ --rrs /home.local/osm/bin/osmrerenderwrapper-osmde.sh \ /var/lib/tirex/tiles/osmde + else + echo "Expiryfile exists but rerendering is disabled." + fi rm $EXPIRYFILE fi echo "Ending update script cleanly: `date`"