function apachesolr_batch_index_finished in Apache Solr Search 6.2
Batch 'finished' callback
1 string reference to 'apachesolr_batch_index_finished'
- apachesolr_batch_index_remaining in ./
apachesolr.admin.inc - Submit a batch job to index the remaining, unindexed content.
File
- ./
apachesolr.admin.inc, line 891 - Administrative pages for the Apache Solr framework.
Code
function apachesolr_batch_index_finished($success, $results, $operations) {
$message = '';
// $results['count'] will not be set if Solr is unavailable.
if (isset($results['count'])) {
$message .= format_plural($results['count'], '1 item processed successfully.', '@count items successfully processed.');
}
if ($success) {
$type = 'status';
}
else {
// An error occurred. $operations contains the unprocessed operations.
$error_operation = reset($operations);
$message .= ' ' . t('An error occurred while processing @num with arguments :', array(
'@num' => $error_operation[0],
)) . print_r($error_operation[0], TRUE);
$type = 'error';
}
drupal_set_message($message, $type);
}