public function Lock::unlock in Ultimate Cron 8.2
Release lock.
Parameters
string $lock_id: The lock id to release.
Overrides LockInterface::unlock
1 call to Lock::unlock()
- Lock::shutdown in src/
Lock/ Lock.php - Shutdown handler for releasing locks.
File
- src/
Lock/ Lock.php, line 124
Class
- Lock
- Class for handling lock functions.
Namespace
Drupal\ultimate_cron\LockCode
public function unlock($lock_id) {
$unlocked = $this->connection
->update('ultimate_cron_lock')
->expression('current', 'lid')
->condition('lid', $lock_id)
->condition('current', 0)
->execute();
$this
->persist($lock_id);
return $unlocked;
}