You are here

function background_process_get_service_groups in Background Process 8

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

Implements to Get service hosts defined in the system.

2 calls to background_process_get_service_groups()
BackgroundProcessSettingsForm::buildForm in src/Form/BackgroundProcessSettingsForm.php
Implements to Build Form.
background_process_settings_form in ./background_process.admin.inc
Implements definition for settings page.

File

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

Code

function background_process_get_service_groups() {
  $service_groups = \Drupal::config('background_process.settings')
    ->get('background_process_service_groups');
  $service_groups = [
    'default' => [
      'hosts' => [
        \Drupal::config('background_process.settings')
          ->get('background_process_default_service_host'),
      ],
    ],
  ];
  foreach ($service_groups as &$service_group) {
    $service_group += [
      'method' => 'background_process_service_group_round_robin',
    ];
  }
  return $service_groups;
}