fixes #2499 make the check_for_updates a unique_exec

This commit is contained in:
plegall
2026-01-04 20:48:27 +01:00
parent e3c80efe63
commit ea80dca422
2 changed files with 13 additions and 4 deletions
+3
View File
@@ -3011,7 +3011,10 @@ SELECT
function pwg_unique_exec_ends($token_name)
{
global $logger;
conf_delete_param($token_name.'_running');
$logger->info('['.$token_name.'] ends now');
}
/**
+6
View File
@@ -41,11 +41,17 @@ if ($conf['update_notify_check_period'] > 0)
}
if ($check_for_updates)
{
$exec_id = pwg_unique_exec_begins('check_for_updates');
if (false !== $exec_id)
{
include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
include_once(PHPWG_ROOT_PATH.'admin/include/updates.class.php');
$updates = new updates();
$updates->notify_piwigo_new_versions();
pwg_unique_exec_ends('check_for_updates', $exec_id);
}
}
}