X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FCore%2FUpdate.php;h=978baec10f871b55f3f2de2596f4787dde30be81;hb=4724000d06cd47bd5eee97111f2723962007d3dc;hp=404b217bbafd87febe6ea4002f995fd7157cd7dc;hpb=a6423031eba1236127160ced3028e36401f40536;p=friendica.git diff --git a/src/Core/Update.php b/src/Core/Update.php index 404b217bba..978baec10f 100644 --- a/src/Core/Update.php +++ b/src/Core/Update.php @@ -1,6 +1,6 @@ acquire('dbupdate', 0, Cache\Duration::INFINITE)) { + if (DI::lock()->acquire('dbupdate', 0, Cache\Enum\Duration::INFINITE)) { Logger::notice('Update starting.', ['from' => $stored, 'to' => $current]); @@ -213,6 +213,8 @@ class Update if ($sendMail) { self::updateSuccessful($stored, $current); } + } else { + Logger::warning('Update lock could not be acquired'); } } } @@ -244,7 +246,7 @@ class Update // If the update fails or times-out completely you may need to // delete the config entry to try again. - if (DI::lock()->acquire('dbupdate_function', 120, Cache\Duration::INFINITE)) { + if (DI::lock()->acquire('dbupdate_function', 120, Cache\Enum\Duration::INFINITE)) { // call the specific update Logger::notice('Pre update function start.', ['function' => $funcname]);