mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-04-08 18:55:09 +02:00
Avoid performance tests if there are not enough modules in system
This commit is contained in:
parent
ed50126b1b
commit
73c182f65d
@ -45,6 +45,11 @@ enterprise_include_once('include/functions_cron.php');
|
||||
class ConsoleSupervisor
|
||||
{
|
||||
|
||||
/**
|
||||
* Minimum modules to check performance.
|
||||
*/
|
||||
public const MIN_PERFORMANCE_MODULES = 100;
|
||||
|
||||
/**
|
||||
* Show if console supervisor is enabled or not.
|
||||
*
|
||||
@ -1141,6 +1146,12 @@ class ConsoleSupervisor
|
||||
$max_grown = ($total_modules[$queue['server_type']] * 0.40);
|
||||
}
|
||||
|
||||
if ($total_modules[$queue['server_type']] < self::MIN_PERFORMANCE_MODULES) {
|
||||
$this->cleanNotifications('NOTIF.SERVER.QUEUE.'.$key);
|
||||
// Skip.
|
||||
continue;
|
||||
}
|
||||
|
||||
// Compare queue increments in a not over 900 seconds.
|
||||
if (empty($previous[$key]['modules'])
|
||||
|| ($time - $previous[$key]['utime']) > 900
|
||||
|
Loading…
x
Reference in New Issue
Block a user