You are here

public function UltimateCronQueueSettings::cron_pre_schedule in Ultimate Cron 7.2

Implements hook_cron_alter().

Overrides UltimateCronPlugin::cron_pre_schedule

File

plugins/ultimate_cron/settings/queue.class.php, line 232
Queue settings for Ultimate Cron.

Class

UltimateCronQueueSettings
Queue settings plugin class.

Code

public function cron_pre_schedule($job) {
  $queue_name = !empty($job->hook['settings']['queue']['name']) ? $job->hook['settings']['queue']['name'] : FALSE;
  if ($queue_name) {
    if (empty(self::$throttled[$job->name])) {
      self::$throttled[$job->name] = TRUE;
      $this
        ->throttle($job);
    }
  }
}