public function AcquiaPurgeService::lockActive in Acquia Purge 7
Check if the queue is locked.
Return value
true|false TRUE when locked, FALSE when it is not (or when a lock expired).
2 calls to AcquiaPurgeService::lockActive()
- AcquiaPurgeService::lockAcquire in lib/
AcquiaPurgeService.php - Retrieve permission to process the queue.
- AcquiaPurgeService::stats in lib/
AcquiaPurgeService.php - Retrieve progress statistics.
File
- lib/
AcquiaPurgeService.php, line 359 - Contains AcquiaPurgeService.
Class
- AcquiaPurgeService
- The Acquia Purge service.
Code
public function lockActive() {
$locked = $this
->state()
->get('locked', FALSE)
->get();
if (is_int($locked)) {
if (time() - $locked <= 60) {
return TRUE;
}
}
return FALSE;
}