function _perfmon_batch_finished in Performance monitor 8
Same name and namespace in other branches
- 7 perfmon.module \_perfmon_batch_finished()
Finished callback for Batch processing the checklist.
1 string reference to '_perfmon_batch_finished'
- PerfmonRunForm::submitForm in src/
Form/ PerfmonRunForm.php - Form submission handler.
File
- ./
perfmon.module, line 709 - Stand-alone perfmon test system.
Code
function _perfmon_batch_finished($success, $results, $operations) {
\Drupal::configFactory()
->getEditable('perfmon.settings')
->set('last_run', time())
->save();
if ($success) {
if (!empty($results)) {
// Store results in our present table.
perfmon_store_results($results);
}
\Drupal::messenger()
->addMessage(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('Operation ' . $error_operation[0], $message);
\Drupal::messenger()
->addMessage(t('The review did not store all results, please run again or check the logs for details.'));
}
}