You are here

function _perfmon_batch_finished in Performance monitor 7

Same name and namespace in other branches
  1. 8 perfmon.module \_perfmon_batch_finished()

Finished callback for Batch processing the checklist.

1 string reference to '_perfmon_batch_finished'
perfmon_run_form_submit in ./perfmon.pages.inc
Run all tests in batch.

File

./perfmon.module, line 199
TODO: Enter file description here.

Code

function _perfmon_batch_finished($success, $results, $operations) {
  variable_set('perfmon_last_run', time());
  module_load_include('inc', 'perfmon');
  if ($success) {
    if (!empty($results)) {

      // Store results in our present table.
      perfmon_store_results($results);
    }
    drupal_set_message(t('Review complete'));
  }
  else {
    $error_operation = reset($operations);
    $message = 'An error occurred while processing ' . $error_operation[0] . ' with arguments :' . print_r($error_operation[0], TRUE);
    _perfmon_log('All tests', $message, array(), WATCHDOG_ERROR);
    drupal_set_message(t('The review did not store all results, please run again or check the logs for details.'));
  }
}