fixes #2333 avoid deadlock while waiting for user_cache rebuild

This commit is contained in:
plegall
2025-03-01 12:04:23 +01:00
parent 6489dceadf
commit 5eacda0d76
2 changed files with 21 additions and 2 deletions
+13
View File
@@ -2881,6 +2881,19 @@ INSERT IGNORE
return $exec_id;
}
function pwg_unique_exec_is_running($token_name)
{
$query = '
SELECT
COUNT(*)
FROM '.CONFIG_TABLE.'
WHERE param = "'.$token_name.'_running"
;';
list($counter) = pwg_db_fetch_row(pwg_query($query));
return $counter > 0;
}
function pwg_unique_exec_ends($token_name)
{
conf_delete_param($token_name.'_running');