X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FCore%2FUpdate.php;h=978baec10f871b55f3f2de2596f4787dde30be81;hb=44291a465bb9b9c54b8781d6d6f13e1c3f317c1b;hp=6b4d6f286bea8f2b2193a7a7cedf3c172b8306a5;hpb=38a5358bfa646ae13a4a1a385741890fa88d9b7f;p=friendica.git diff --git a/src/Core/Update.php b/src/Core/Update.php index 6b4d6f286b..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]);