You are here

public function UltimateCronSerialLauncher::isLockedMultiple in Ultimate Cron 7.2

Check lock for multiple jobs.

Overrides UltimateCronLauncher::isLockedMultiple

File

plugins/ultimate_cron/launcher/serial.class.php, line 168
Serial cron job launcher for Ultimate Cron.

Class

UltimateCronSerialLauncher
Ultimate Cron launcher plugin class.

Code

public function isLockedMultiple($jobs) {
  $names = array();
  foreach ($jobs as $job) {
    $names[] = $job->name;
  }
  $class = _ultimate_cron_get_class('lock');
  $lock_ids = $class::isLockedMultiple($names);
  foreach ($lock_ids as &$lock_id) {
    $lock_id = $lock_id ? $this->name . '-' . $lock_id : $lock_id;
  }
  return $lock_ids;
}