mirror of
https://github.com/friendica/friendica
synced 2025-04-27 01:10:14 +00:00
Fixings
- fixed test for semaphore - fixed some issues - changed namespace in Tests back to "src/" - changed namings
This commit is contained in:
parent
906bb25972
commit
e41e7d2edd
15 changed files with 67 additions and 65 deletions
|
@ -6,26 +6,22 @@
|
|||
|
||||
namespace Friendica\Model;
|
||||
|
||||
use dba;
|
||||
use Friendica\BaseObject;
|
||||
use Friendica\Content\Text;
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Lock;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Core\Worker;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\Conversation;
|
||||
use Friendica\Model\Group;
|
||||
use Friendica\Model\Term;
|
||||
use Friendica\Object\Image;
|
||||
use Friendica\Protocol\Diaspora;
|
||||
use Friendica\Protocol\OStatus;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
use Friendica\Util\XML;
|
||||
use Friendica\Util\Lock;
|
||||
use dba;
|
||||
use Text_LanguageDetect;
|
||||
|
||||
require_once 'boot.php';
|
||||
|
@ -1595,7 +1591,7 @@ class Item extends BaseObject
|
|||
}
|
||||
|
||||
// To avoid timing problems, we are using locks.
|
||||
$locked = Lock::set('item_insert_content');
|
||||
$locked = Lock::acquire('item_insert_content');
|
||||
if (!$locked) {
|
||||
logger("Couldn't acquire lock for URI " . $item['uri'] . " - proceeding anyway.");
|
||||
}
|
||||
|
@ -1615,7 +1611,7 @@ class Item extends BaseObject
|
|||
logger('Could not insert content for URI ' . $item['uri'] . ' - trying asynchronously');
|
||||
}
|
||||
if ($locked) {
|
||||
Lock::remove('item_insert_content');
|
||||
Lock::release('item_insert_content');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue