Merge branch 'ent-11441-15692-aviso-sobre-agent-access-statistics-aparece-cada-dia' into 'develop'
Ent 11441 15692 aviso sobre agent access statistics aparece cada dia See merge request artica/pandorafms!6060
This commit is contained in:
commit
01de48631c
|
@ -679,20 +679,24 @@ class ConsoleSupervisor
|
|||
*/
|
||||
public function checkAccessStatisticsPerformance()
|
||||
{
|
||||
global $config;
|
||||
|
||||
$total_agents = db_get_value('count(*)', 'tagente');
|
||||
|
||||
if ($total_agents >= 200) {
|
||||
db_process_sql_update('tconfig', ['value' => 0], ['token' => 'agentaccess']);
|
||||
$this->notify(
|
||||
[
|
||||
'type' => 'NOTIF.ACCESSSTASTICS.PERFORMANCE',
|
||||
'title' => __('Access statistics performance'),
|
||||
'message' => __(
|
||||
'Usage of agent access statistics IS NOT RECOMMENDED on systems with more than 200 agents due performance penalty'
|
||||
),
|
||||
'url' => '__url__/index.php?sec=general&sec2=godmode/setup/setup§ion=perf',
|
||||
]
|
||||
);
|
||||
if ($config['agentaccess'] !== 0) {
|
||||
db_process_sql_update('tconfig', ['value' => 0], ['token' => 'agentaccess']);
|
||||
$this->notify(
|
||||
[
|
||||
'type' => 'NOTIF.ACCESSSTASTICS.PERFORMANCE',
|
||||
'title' => __('Access statistics performance'),
|
||||
'message' => __(
|
||||
'Usage of agent access statistics IS NOT RECOMMENDED on systems with more than 200 agents due performance penalty'
|
||||
),
|
||||
'url' => '__url__/index.php?sec=general&sec2=godmode/setup/setup§ion=perf',
|
||||
]
|
||||
);
|
||||
}
|
||||
} else {
|
||||
$this->cleanNotifications('NOTIF.ACCESSSTASTICS.PERFORMANCE');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue