public function UltimateCronJob::lock in Ultimate Cron 7.2
Lock job.
File
- ./
ultimate_cron.job.inc, line 408 - Job class for Ultimate Cron.
Class
- UltimateCronJob
- Class for handling cron jobs.
Code
public function lock() {
$launcher = $this
->getPlugin('launcher');
$lock_id = $launcher
->lock($this);
if (!$lock_id) {
watchdog('ultimate_cron', 'Could not get lock for job @name', array(
'@name' => $this->name,
), WATCHDOG_ERROR);
return FALSE;
}
$this
->sendMessage('lock', array(
'lock_id' => $lock_id,
));
return $lock_id;
}