function _acquia_purge_get_diagnosis_status in Acquia Purge 6
Report on the current status of the system.
@returns Associative array with the following elements:
- title: The name of the requirement.
- value: The current value (e.g., version, time, level, etc).
- description: The description of the requirement/status.
- severity: ACQUIA_PURGE_SEVLEVEL_INFO, _OK, _WARNING, _ERROR
Parameters
string $t: Name of the t() function to call.
File
- ./
acquia_purge.diagnostics.inc, line 355 - Self-test diagnostic test functions for _acquia_purge_get_diagnosis().
Code
function _acquia_purge_get_diagnosis_status($t) {
$stats = _acquia_purge_queue_stats();
$test = array(
'title' => $t('Status'),
'severity' => ACQUIA_PURGE_SEVLEVEL_INFO,
);
// Determine the status message.
$status = $t('Idle, accepting purges');
if ($stats['running']) {
$status = $t('Active ongoing purges, @remaining items to go...', array(
'@remaining' => $stats['remaining'],
));
}
// Set the status on the plain-text and HTML versions.
$test['value'] = $test['value_plain'] = $status;
// Insert a HTML status widget into the description field if its running.
if ($stats['running']) {
$test['description'] = theme('acquia_purge_status_bar_widget', $stats);
}
return $test;
}