You are here

function background_process_get_service_hosts in Background Process 7.2

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

Get service hosts defined in the system.

9 calls to background_process_get_service_hosts()
BackgroundProcess::setServiceHost in ./background_process.inc
Set current service host.
background_process_ass_auto_unlock in background_process_ass/background_process_ass.module
Unlock locked processes that aren't really running.
background_process_ass_init in background_process_ass/background_process_ass.module
Implements hook_init().
background_process_build_request in ./background_process.http.inc
Build url and headers for http request
background_process_cron_queue_info in ./background_process.module
Implements hook_cron_queue_info().

... See full list

File

./background_process.module, line 582

Code

function background_process_get_service_hosts() {
  global $base_url;
  $default_options = array(
    'max_clients' => -1,
  );

  // Get defined service groups
  $service_hosts = variable_get('background_process_service_hosts', array());
  $service_hosts += array(
    'default' => array(
      'dispatcher' => 'http',
      'base_url' => $base_url,
    ),
  );

  // Populate service hosts with default options
  foreach ($service_hosts as &$service_host) {
    $service_host += background_process_get_service_host_options($service_host) + $default_options;
  }
  return $service_hosts;
}