From 3a74a6ea4265592a7bff76fbb344b3ca426930f4 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Tue, 2 Nov 2021 13:59:17 +0100 Subject: [PATCH] custom val --- pandora_console/include/class/ConsoleSupervisor.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/class/ConsoleSupervisor.php b/pandora_console/include/class/ConsoleSupervisor.php index 96e46aa8cb..ea0ac8479d 100644 --- a/pandora_console/include/class/ConsoleSupervisor.php +++ b/pandora_console/include/class/ConsoleSupervisor.php @@ -2718,6 +2718,8 @@ class ConsoleSupervisor */ public function checkSyncQueueLength() { + global $config; + if (is_metaconsole() !== true) { return; } @@ -2730,8 +2732,13 @@ class ConsoleSupervisor $this->cleanNotifications('NOTIF.SYNCQUEUE.LENGTH.%'); } + $items_min = $config['sync_queue_items_max']; + if (is_numeric($items_min) !== true && $items_min <= 0) { + $items_min = self::MIN_SYNC_QUEUE_LENGTH; + } + foreach ($counts as $node_id => $count) { - if ($count < self::MIN_SYNC_QUEUE_LENGTH) { + if ($count < $items_min) { $this->cleanNotifications('NOTIF.SYNCQUEUE.LENGTH.'.$node_id); } else { try { @@ -2747,7 +2754,7 @@ class ConsoleSupervisor 'Synchronization queue lenght for node %s is %d items, this value should be 0 or lower than %d, please check the queue status.', $node->server_name(), $count, - self::MIN_SYNC_QUEUE_LENGTH + $items_min ), 'url' => $url, ]