Mercurial > ~darius > hgwebdir.cgi > wh1080
view db/tidy-observations @ 3:dc5ff2a1ed81
Be smarter about retries.
If the interrupt endpoint can't be read 100 times then retry the whole request.
author | Daniel O'Connor <darius@dons.net.au> |
---|---|
date | Wed, 10 Feb 2010 11:33:27 +1030 |
parents | 9dab44dcb331 |
children |
line wrap: on
line source
/* * $Id: tidy-observations,v 1.4 2010/01/03 03:03:17 grog Exp grog $ * * Tidy up messed-up values returned from various stations. */ USE weather UPDATE remote_observations SET wind_gust = NULL WHERE wind_gust < 0; UPDATE remote_observations SET rain = NULL WHERE rain < 0; /* Never likely to go below this temperature here */ UPDATE remote_observations SET outside_temp = NULL WHERE outside_temp < -10; /* This one is 0° F, which must mean something special to Wunderground */ UPDATE remote_observations SET outside_dewpoint = NULL WHERE outside_dewpoint = -17.8; UPDATE remote_observations SET wind_gust = NULL WHERE wind_gust < 0; UPDATE remote_observations SET rain = NULL WHERE rain < 0; UPDATE remote_observations SET wind_speed = NULL WHERE wind_speed < 0; UPDATE remote_observations SET outside_humidity = NULL WHERE outside_humidity < 0; UPDATE remote_observations SET wind_direction = NULL WHERE wind_direction < 0; UPDATE remote_observations SET pressure_msl = NULL WHERE pressure_msl < 900 OR pressure_msl > 1100; UPDATE remote_observations SET outside_dewpoint = NULL WHERE outside_dewpoint < -20;