From 86058711723e68e3a174d69317593d54096b28a0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Tue, 17 Aug 2021 01:01:59 +0200 Subject: [PATCH] Add skip on weather unavailable data when startup timeout makes us miss upstream data --- Command/WeatherCommand.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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]; -- 2.41.0