From 53a593ad3952878f1c6f08bb1e26bb0183e012cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc?= <1536036+zoic21@users.noreply.github.com> Date: Tue, 29 Oct 2024 16:14:09 +0100 Subject: [PATCH] increase get timeout --- core/class/weather.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/class/weather.class.php b/core/class/weather.class.php index 60e82a4..effe5a1 100644 --- a/core/class/weather.class.php +++ b/core/class/weather.class.php @@ -143,6 +143,7 @@ public static function calculDJU($methodeDJU, $temperatureID, $start, $end, $tem } public static function cron30($_eqLogic_id = null) { + sleep(rand(0,180)); if ($_eqLogic_id == null) { $eqLogics = self::byType(__CLASS__, true); } else { @@ -1033,7 +1034,7 @@ public function updateWeatherData() { $url .= '&lang=' . substr(config::byKey('language'), 0, 2); $request_http = new com_http($url); $request_http->setHeader(array('Autorization: ' . sha512(mb_strtolower(config::byKey('market::username')) . ':' . config::byKey('market::password')))); - $datas = json_decode($request_http->exec(10), true); + $datas = json_decode($request_http->exec(60,6), true); log::add(__CLASS__, 'debug', $url . ' : ' . json_encode($datas)); if ($datas['state'] != 'ok') { return;