- // We are having duplicated entries. Hopefully this solves it.
- if (DI::lock()->acquire('ostatus_process_item_insert')) {
- $ret = Item::insert($item);
- 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);
- Logger::log("We couldn't lock - but tried to store the item anyway. Return value is ".$ret);
- }
+ $ret = Item::insert($item);
+ Logger::log("Item with uri ".$item["uri"]." for user ".$importer["uid"].' stored. Return value: '.$ret);