Force sync all new agents if node has metaconsole and agent cache is enabled

This commit is contained in:
fbsanchez 2021-07-06 10:06:17 +02:00
parent dec62ffca4
commit 2acb3abf92
1 changed files with 7 additions and 0 deletions

View File

@ -251,6 +251,13 @@ function agents_create_agent(
return false;
}
if (has_metaconsole() === true
&& (bool) $config['metaconsole_agent_cache'] === true
) {
// Force an update of the agent cache.
$values['update_module_count'] = 1;
}
$id_agent = db_process_sql_insert('tagente', $values);
if ($id_agent === false) {
return false;