Merge pull request #8071 from nupplaphil/task/Lock_to_lock

Replace Core\Lock wrapper with DI::lock() method
This commit is contained in:
Hypolite Petovan 2020-01-08 14:25:46 -05:00 committed by GitHub
commit f67f398fe1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 75 additions and 130 deletions

View file

@ -539,9 +539,9 @@ class OStatus
Logger::log("Item with uri ".$item["uri"]." is from a blocked contact.", Logger::DEBUG);
} else {
// We are having duplicated entries. Hopefully this solves it.
if (Lock::acquire('ostatus_process_item_insert')) {
if (DI::lock()->acquire('ostatus_process_item_insert')) {
$ret = Item::insert($item);
Lock::release('ostatus_process_item_insert');
DI::lock()->release('ostatus_process_item_insert');
Logger::log("Item with uri ".$item["uri"]." for user ".$importer["uid"].' stored. Return value: '.$ret);
} else {
$ret = Item::insert($item);