You are here

public static function CronJob::isLockedMultiple in Ultimate Cron 8.2

Get locked state for multiple jobs.

Parameters

array $jobs: Jobs to check locks for.

Overrides CronJobInterface::isLockedMultiple

File

src/Entity/CronJob.php, line 433

Class

CronJob
Class for handling cron jobs.

Namespace

Drupal\ultimate_cron\Entity

Code

public static function isLockedMultiple($jobs) {
  $launchers = array();
  foreach ($jobs as $job) {
    $launchers[$job
      ->getPlugin('launcher')->name][$job
      ->id()] = $job;
  }
  $locked = array();
  foreach ($launchers as $launcher => $jobs) {
    $locked += ultimate_cron_plugin_load('launcher', $launcher)
      ->isLockedMultiple($jobs);
  }
  return $locked;
}