From cc23b8310fd82d8ed9c262e9f3791cb14ca2fe48 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Mon, 12 Jul 2021 17:41:58 +0200 Subject: [PATCH] Avoid check for UM messages more often than 2h --- pandora_console/include/class/ConsoleSupervisor.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pandora_console/include/class/ConsoleSupervisor.php b/pandora_console/include/class/ConsoleSupervisor.php index 539504cd94..4353ce9a15 100644 --- a/pandora_console/include/class/ConsoleSupervisor.php +++ b/pandora_console/include/class/ConsoleSupervisor.php @@ -2394,6 +2394,10 @@ class ConsoleSupervisor return; } + // Only ask for messages once every 2 hours. + $future = (time() + 2 * SECONDS_1HOUR); + config_update_value('last_um_check', $future); + $messages = update_manager_get_messages(); if (is_array($messages) === true) { $source_id = get_notification_source_id(