You are here

function ultimate_cron_get_service_groups in Ultimate Cron 7

Same name and namespace in other branches
  1. 8 ultimate_cron.module \ultimate_cron_get_service_groups()
  2. 6 ultimate_cron.module \ultimate_cron_get_service_groups()

Get service hosts defined in the system.

2 calls to ultimate_cron_get_service_groups()
ultimate_cron_function_settings_form in ./ultimate_cron.admin.inc
Function settings form.
ultimate_cron_settings_form in ./ultimate_cron.admin.inc
Settings form.

File

./ultimate_cron.module, line 1392
@todo Add filter on overview page. @todo Add log view (with graph). @todo Make proper markup for overview page. @todo Refactor drush stuff, too many intimate relations with Background Process @todo Refactor Cron % offset stuff. Too mixed up and…

Code

function ultimate_cron_get_service_groups() {
  if (function_exists('background_process_get_service_groups')) {
    return background_process_get_service_groups();
  }

  // Fallback for setups that havent upgraded Background Process.
  // We have this to avoid upgrade dependencies or majer version bump.
  $service_groups = variable_get('background_process_service_groups', array());
  $service_groups += array(
    'default' => array(
      'hosts' => array(
        variable_get('background_process_default_service_host', 'default'),
      ),
    ),
  );
  foreach ($service_groups as &$service_group) {
    $service_group += array(
      'method' => 'background_process_service_group_random',
    );
  }
  return $service_groups;
}