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');
    }
  }