mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-09 08:34:26 +02:00
Fixing force-flag for lock-releasing
This commit is contained in:
parent
9f11476ca0
commit
9b07132b80
6 changed files with 23 additions and 11 deletions
|
@ -61,11 +61,15 @@ class CacheLockDriver extends AbstractLockDriver
|
|||
/**
|
||||
* (@inheritdoc)
|
||||
*/
|
||||
public function releaseLock($key)
|
||||
public function releaseLock($key, $force = false)
|
||||
{
|
||||
$cachekey = self::getLockKey($key);
|
||||
|
||||
$this->cache->compareDelete($cachekey, getmypid());
|
||||
if ($force) {
|
||||
$this->cache->delete($key);
|
||||
} else {
|
||||
$this->cache->compareDelete($cachekey, getmypid());
|
||||
}
|
||||
$this->markRelease($key);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue