Browse Source

Moved Lock.php back to Utils

pull/5291/head
Philipp Holzer 4 years ago
parent
commit
a57e6cfa1b
No known key found for this signature in database
GPG Key ID: 58160D7D6AF942B6
  1. 1
      src/Core/Worker.php
  2. 1
      src/Protocol/OStatus.php
  3. 7
      src/Util/Lock.php
  4. 2
      src/Util/Lock/DatabaseLockDriver.php
  5. 5
      src/Util/Lock/ILockDriver.php
  6. 2
      src/Util/Lock/MemcacheLockDriver.php
  7. 2
      src/Util/Lock/SemaphoreLockDriver.php

1
src/Core/Worker.php

@ -11,6 +11,7 @@ use Friendica\Database\DBM;
use Friendica\Model\Process;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Network;
use Friendica\Util\Lock;
use dba;
require_once 'include/dba.php';

1
src/Protocol/OStatus.php

@ -19,6 +19,7 @@ use Friendica\Model\User;
use Friendica\Network\Probe;
use Friendica\Object\Image;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Lock;
use Friendica\Util\Network;
use Friendica\Util\XML;
use dba;

7
src/Core/Lock.php → src/Util/Lock.php

@ -10,7 +10,7 @@ namespace Friendica\Util;
*/
use Friendica\Core\Config;
use Friendica\Core\Lock;
use Friendica\Util\Lock;
require_once 'include/dba.php';
@ -94,4 +94,9 @@ class Lock
{
self::getDriver()->releaseAll();
}
public static function isLocked($key)
{
}
}

2
src/Core/Lock/DatabaseLockDriver.php → src/Util/Lock/DatabaseLockDriver.php

@ -1,6 +1,6 @@
<?php
namespace Friendica\Core\Lock;
namespace Friendica\Util\Lock;
use dba;
use Friendica\Database\DBM;

5
src/Core/Lock/ILockDriver.php → src/Util/Lock/ILockDriver.php

@ -1,6 +1,6 @@
<?php
namespace Friendica\Core\Lock;
namespace Friendica\Util\Lock;
/**
* Lock Driver Interface
@ -35,4 +35,7 @@ interface ILockDriver
* @return void
*/
public function releaseAll();
public function isLocked();
}

2
src/Core/Lock/MemcacheLockDriver.php → src/Util/Lock/MemcacheLockDriver.php

@ -1,6 +1,6 @@
<?php
namespace Friendica\Core\Lock;
namespace Friendica\Util\Lock;
use Friendica\Core\Cache;
use dba;

2
src/Core/Lock/SemaphoreLockDriver.php → src/Util/Lock/SemaphoreLockDriver.php

@ -1,6 +1,6 @@
<?php
namespace Friendica\Core\Lock;
namespace Friendica\Util\Lock;
class SemaphoreLockDriver implements ILockDriver
{
Loading…
Cancel
Save