Merge branch 'ent-9362-the-tagente_datos-table-contains-too-much-data' into 'develop'

Ent 9362 the tagente datos table contains too much data

See merge request artica/pandorafms!5375
This commit is contained in:
Daniel Rodriguez 2023-01-10 11:38:54 +00:00
commit 172cb38045
1 changed files with 6 additions and 1 deletions

View File

@ -1276,11 +1276,16 @@ class Diagnostics extends Wizard
FROM tagente_datos'
);
$modulesDataCount = db_get_value_sql(
'SELECT count(*) * 300 FROM (SELECT * FROM tagente_datos GROUP BY id_agente_modulo) AS totalmodules'
);
$modulesDataCount = ($modulesDataCount >= 500000) ? $modulesDataCount : 500000;
$taMsg = __(
'The tagente_datos table contains too much data. A historical database is recommended.'
);
$taStatus = 0;
if ($agentDataCount <= 3000000) {
if ($agentDataCount <= $modulesDataCount) {
$taMsg = __(
'The tagente_datos table contains an acceptable amount of data.'
);