From: Raphaƫl Gertz Date: Mon, 16 Aug 2021 23:01:59 +0000 (+0200) Subject: Add skip on weather unavailable data when startup timeout makes us miss upstream... X-Git-Tag: 0.2.0~82 X-Git-Url: https://git.rapsys.eu/airbundle/commitdiff_plain/d2cc96771dfe99250fc381de504c374c0a4e4e49 Add skip on weather unavailable data when startup timeout makes us miss upstream data --- diff --git a/Command/WeatherCommand.php b/Command/WeatherCommand.php index 4b3ea40..c2aae61 100644 --- a/Command/WeatherCommand.php +++ b/Command/WeatherCommand.php @@ -343,11 +343,11 @@ class WeatherCommand extends DoctrineCommand { $hour = $type=='daily'?$type:$time->format('H'); //Check data availability - //XXX: should never happen - #if (!isset($data[$zipcode][$dsm][$hour])) { - # //Skip unavailable data - # continue; - #} + //XXX: sometimes startup delay causes weather data to be unavailable for session first hour + if (!isset($data[$zipcode][$dsm][$hour])) { + //Skip unavailable data + continue; + } //Set info alias $info = $data[$zipcode][$dsm][$hour];