public static function finished($success, $results, $operations) {
    if ($success) {
      $message = t('@count sessions were processed.', ['@count' => count($results)]);
      drupal_set_message($message);
    }
    else {
      // An error occurred.
      $error_operation = reset($operations);
      $message = t('An error occurred while processing %error_operation with arguments: @arguments',
        array(
          '%error_operation' => $error_operation[0],
          '@arguments' => print_r($error_operation[1], TRUE)
        ));
      drupal_set_message($message, 'error');
    }
  }
public static function finished($success, $results, $operations) {
    if ($success) {
      $message = t('@count sessions were processed.', ['@count' => count($results)]);
      drupal_set_message($message);
    }
    else {
      // An error occurred.
      $error_operation = reset($operations);
      $message = t('An error occurred while processing %error_operation with arguments: @arguments',
        array(
          '%error_operation' => $error_operation[0],
          '@arguments' => print_r($error_operation[1], TRUE)
        ));
      drupal_set_message($message, 'error');
    }
  }
public static function finished ( $ success , $ results , $ operations ) { if ( $ success ) { $ message = t ( '@count sessions were processed.' , [ '@count' => count ( $ results ) ] ) ; drupal_set_message ( $ message ) ; } else { // An error occurred. $ error_operation = reset ( $ operations ) ; $ message = t ( 'An error occurred while processing %error_operation with arguments: @arguments' , array ( '%error_operation' => $ error_operation [ 0 ] , '@arguments' => print_r ( $ error_operation [ 1 ] , TRUE ) ) ) ; drupal_set_message ( $ message , 'error' ) ; } }
Batch finalization sessions instance actualization.

@param $success bool
A boolean indicating whether the batch has completed successfully.
@param $results array
The value set in $context['results'] by callback_batch_operation().
@param $operations array
If $success is FALSE, contains the operations that remained unprocessed.
Batch finalization sessions instance actualization .