You are here

public static function SearchApiAlgoliaCommands::batchStart in Search API Algolia 3.0.x

Batch callback; initialize the batch.

Parameters

int $total: The total number of nids to process.

mixed|array $context: The batch current context.

File

src/Commands/SearchApiAlgoliaCommands.php, line 115

Class

SearchApiAlgoliaCommands
Class Search Api Algolia commands.

Namespace

Drupal\search_api_algolia\Commands

Code

public static function batchStart($total, &$context) {
  $context['results']['total'] = $total;
  $context['results']['count'] = 0;
  $context['results']['timestart'] = microtime(TRUE);
}