mirror of
https://github.com/friendica/friendica
synced 2025-04-29 23:44:22 +02:00
parent
6189f6c8e7
commit
4ca68c7af0
151 changed files with 987 additions and 8742 deletions
|
@ -9,7 +9,7 @@ namespace Friendica\Util;
|
|||
*/
|
||||
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Database\Dbm;
|
||||
use Friendica\Database\DBM;
|
||||
use Memcache;
|
||||
use dba;
|
||||
|
||||
|
@ -121,7 +121,7 @@ class Lock {
|
|||
dba::lock('locks');
|
||||
$lock = dba::select('locks', array('locked', 'pid'), array('name' => $fn_name), array('limit' => 1));
|
||||
|
||||
if (Dbm::is_result($lock)) {
|
||||
if (DBM::is_result($lock)) {
|
||||
if ($lock['locked']) {
|
||||
// When the process id isn't used anymore, we can safely claim the lock for us.
|
||||
if (!posix_kill($lock['pid'], 0)) {
|
||||
|
@ -136,7 +136,7 @@ class Lock {
|
|||
dba::update('locks', array('locked' => true, 'pid' => getmypid()), array('name' => $fn_name));
|
||||
$got_lock = true;
|
||||
}
|
||||
} elseif (!Dbm::is_result($lock)) {
|
||||
} elseif (!DBM::is_result($lock)) {
|
||||
dba::insert('locks', array('name' => $fn_name, 'locked' => true, 'pid' => getmypid()));
|
||||
$got_lock = true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue