1st steps show node pending queries

This commit is contained in:
fbsanchez 2021-05-10 13:40:41 +02:00
parent 2240f71c0c
commit 1f968a0ce0
1 changed files with 26 additions and 0 deletions

View File

@ -2176,6 +2176,32 @@ function db_check_minor_relase_available_to_um($package, $ent, $offline)
}
/**
* Checks if a lock is free or not.
*
* @param string $lockname Name.
*
* @return boolean Free or not.
*/
function db_is_free_lock($lockname)
{
global $config;
// Temporary disable to get a valid lock if any...
$cache = $config['dbcache'];
$config['dbcache'] = false;
$lock_status = db_get_value_sql(
sprintf(
'SELECT IS_FREE_LOCK("%s")',
$lockname
)
);
$config['dbcache'] = $cache;
return (bool) $lock_status;
}
/**
* Tries to get a lock with current name.
*