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…
Reference in New Issue