mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-02 04:15:05 +02:00
fixes #2333 avoid deadlock while waiting for user_cache rebuild
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user