You are here

public function MongodbLock::release in MongoDB 8

Releases the given lock.

Parameters

string $name:

Overrides LockBackendInterface::release

File

src/MongodbLock.php, line 133
Contains \Drupal\mongodb\MongodbLock.

Class

MongodbLock

Namespace

Drupal\mongodb

Code

public function release($name) {
  unset($this->locks[$name]);
  $this
    ->mongoCollection()
    ->remove([
    '_id' => $this
      ->mongoId($name),
  ]);
}