Make two quick requests to the website after reload

Sometimes we get a http 503 error from lighttpd if we hit the system
right after reload - make sure that we hit these errors from
the update script instead of leaking it to the end user or our
mirror script.
This commit is contained in:
Magnus Hagander
2011-12-11 14:20:33 +01:00
parent f76d9baec2
commit 209e19fa86

View File

@ -33,6 +33,15 @@ pkill -f pgweb/manage.py
# Update the file listing the latest update
mv -f /tmp/pgweb.update lastupdate
# Hit the web app a couple of times, since in some cases lighttpd
# generates a 503 error on the first one or two hits. Make sure
# we eat these up, instead of the mirror checker or even worse,
# an end user.
wget --header "Host: www.postgresql.org" http://localhost/web_sync_timestamp -O /dev/null -q
sleep 1
wget --header "Host: www.postgresql.org" http://localhost/web_sync_timestamp -O /dev/null -q
# Unconditionally update the static content (we don't need to reload
# lighttpd for htis, so there is no need to actually check for last
# updates or anything like that)