policy maintenance mode

This commit is contained in:
alejandro.campos@artica.es 2023-02-06 13:24:37 +01:00
parent 6d2f4d7eac
commit a7a0886e6c
1 changed files with 20 additions and 0 deletions

View File

@ -6397,3 +6397,23 @@ function getBearerToken()
return false;
}
/**
* Check whether an instance of pandora_db is running.
*
* @return boolean Result.
*/
function is_pandora_db_running()
{
$is_free_lock = mysql_db_process_sql(
'SELECT IS_FREE_LOCK("pandora_pandora_db") AS "value"',
'affected_rows',
'',
false
);
$is_free_lock = (bool) $is_free_lock[0]['value'];
return !$is_free_lock;
}