From 01bf91f21380dedb58d773caf8c698614e47e511 Mon Sep 17 00:00:00 2001 From: Jorge Rincon Date: Fri, 22 Sep 2023 13:13:06 +0200 Subject: [PATCH 1/2] #11127 Added token Number of modules in queue --- pandora_console/godmode/setup/setup_general.php | 10 ++++++++++ pandora_console/include/functions_config.php | 8 ++++++++ 2 files changed, 18 insertions(+) diff --git a/pandora_console/godmode/setup/setup_general.php b/pandora_console/godmode/setup/setup_general.php index aa55893d11..22737da3d7 100644 --- a/pandora_console/godmode/setup/setup_general.php +++ b/pandora_console/godmode/setup/setup_general.php @@ -766,6 +766,16 @@ $table->data[$i][] = html_print_label_input_block( true ) ); +$table->data[$i++][] = html_print_label_input_block( + __('Number of modules in queue'), + html_print_input_number( + [ + 'name' => 'number_modules_queue', + 'min' => 0, + 'value' => $config['number_modules_queue'], + ] + ) +); echo '
'; diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index 393c6a2610..55b50997aa 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -382,6 +382,10 @@ function config_update_config() $error_update[] = __('show_experimental_features'); } + if (config_update_value('number_modules_queue', get_parameter('number_modules_queue'), true) === false) { + $error_update[] = __('number_modules_queue'); + } + if (config_update_value('console_log_enabled', get_parameter('console_log_enabled'), true) === false) { $error_update[] = __('Console log enabled'); } @@ -2440,6 +2444,10 @@ function config_process_config() config_update_value('show_experimental_features', 0); } + if (!isset($config['number_modules_queue'])) { + config_update_value('number_modules_queue', 500); + } + if (!isset($config['console_log_enabled'])) { config_update_value('console_log_enabled', 0); } From 6ee8154b29dee7990a2062d3cced4ed7c9effa33 Mon Sep 17 00:00:00 2001 From: Jorge Rincon Date: Tue, 21 Nov 2023 11:33:37 +0100 Subject: [PATCH 2/2] #11127 added number modules queue validation for node --- pandora_console/godmode/servers/servers.build_table.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/godmode/servers/servers.build_table.php b/pandora_console/godmode/servers/servers.build_table.php index 101a99d955..152ca24f91 100644 --- a/pandora_console/godmode/servers/servers.build_table.php +++ b/pandora_console/godmode/servers/servers.build_table.php @@ -176,7 +176,7 @@ foreach ($servers as $server) { } $data[6] = ''; - if ($server['queued_modules'] > 500) { + if ($server['queued_modules'] >= $config['number_modules_queue']) { $data[6] .= '