You are here

public static function S3fsRefreshCacheBatch::finished in S3 File System 4.0.x

Same name and namespace in other branches
  1. 8.3 src/Batch/S3fsRefreshCacheBatch.php \Drupal\s3fs\Batch\S3fsRefreshCacheBatch::finished()

Finished batch callback.

Parameters

bool $success: Whether the batch completed successfully or not.

array $results: The results key of the batch context.

array $operations: The operations that were carried out.

Overrides S3fsRefreshCacheBatchInterface::finished

File

src/Batch/S3fsRefreshCacheBatch.php, line 204

Class

S3fsRefreshCacheBatch
Performs a refresh of the s3fs_file table with data from S3 bucket.

Namespace

Drupal\s3fs\Batch

Code

public static function finished(bool $success, array $results, array $operations) {
  \Drupal::messenger()
    ->addStatus(new TranslatableMarkup('The cached list of files has been refreshed in @elapsed_time (hh:mm:ss).', [
    '@elapsed_time' => static::getElapsedTimeFormatted($results['time_start']),
  ]));
}