Merge branch 'ent-10093-Activar-modo-mantenimiento-en-politicas-cuando-se-ejecuta-el-pandora-db' into 'develop'
policy maintenance mode See merge request artica/pandorafms!5506
This commit is contained in:
commit
006b35679d
|
@ -6399,11 +6399,34 @@ function getBearerToken()
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check whether an instance of pandora_db is running.
|
||||
*
|
||||
* @return boolean Result.
|
||||
*/
|
||||
function is_pandora_db_running()
|
||||
{
|
||||
// Get current DB name: useful for metaconsole connection to node.
|
||||
$db_name = db_get_sql('SELECT DATABASE()');
|
||||
|
||||
$is_free_lock = mysql_db_process_sql(
|
||||
'SELECT IS_FREE_LOCK("'.$db_name.'_pandora_db") AS "value"',
|
||||
'affected_rows',
|
||||
'',
|
||||
false
|
||||
);
|
||||
|
||||
$is_free_lock = (bool) $is_free_lock[0]['value'];
|
||||
|
||||
return !$is_free_lock;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check nms license on api.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
* @return boolean.
|
||||
* */
|
||||
function nms_check_api()
|
||||
{
|
||||
global $config;
|
||||
|
|
Loading…
Reference in New Issue