You are here

function background_process_cron_queue_info in Background Process 8

Same name and namespace in other branches
  1. 6 background_process.module \background_process_cron_queue_info()
  2. 7.2 background_process.module \background_process_cron_queue_info()
  3. 7 background_process.module \background_process_cron_queue_info()

Implements hook_cron_queue_info().

File

./background_process.module, line 285
This module implements a framework for calling funtions in the background.

Code

function background_process_cron_queue_info() {
  $queues['background_process'] = [
    'worker callback' => '_background_process_queue',
  ];
  $background_process_queues = \Drupal::config('background_process.settings')
    ->get('background_process_queues');
  foreach ($background_process_queues as $queue_name) {
    $queues['bgp:' . $queue_name] = [
      'worker callback' => '_background_process_queue',
    ];
  }
  return $queues;
}