You are here

function _acquia_purge_diagnostics_backends_executor in Acquia Purge 7

Loaded executors.

Parameters

string $t: Name of the t() function to call.

AcquiaPurgeService $service: The Acquia Purge service.

Return value

array Associative array with the following elements:

1 string reference to '_acquia_purge_diagnostics_backends_executor'
acquia_purge_acquia_purge_diagnostics in ./acquia_purge.module
Implements hook_acquia_purge_diagnostics().

File

./acquia_purge.diagnostics.inc, line 344
Diagnostic self-tests and reports that aim to prevent runtime misery.

Code

function _acquia_purge_diagnostics_backends_executor($t, $service) {
  $executors = $service
    ->executorIds();
  foreach ($executors as $n => $id) {
    $executors[$n] = str_replace('AcquiaPurgeExecutor', '', $id);
  }
  $test = array(
    'value' => implode(', ', $executors),
    'title' => $t('Loaded executors'),
    'severity' => ACQUIA_PURGE_SEVLEVEL_INFO,
  );
  if (empty($executors)) {
    $test['value'] = $t('None');
    $test['severity'] = ACQUIA_PURGE_SEVLEVEL_ERROR;
    $test['description'] = $t("Can't work without loaded executors!");
  }
  return $test;
}