public function ContentHubReindex::reExportEntitiesAfterReindex in Acquia Content Hub 8
Implements Batch API to re-export entities after re-indexing.
Parameters
int $batch_size: The batch size or number of entities processed in a single request.
File
- src/
Controller/ ContentHubReindex.php, line 349
Class
- ContentHubReindex
- Class for reindexing Content Hub content.
Namespace
Drupal\acquia_contenthub\ControllerCode
public function reExportEntitiesAfterReindex($batch_size = 10) {
$batch = [
'title' => $this
->t("Process Content Hub Export Queue"),
'file' => drupal_get_path('module', 'acquia_contenthub') . '/acquia_contenthub.drush.inc',
'operations' => [
[
'\\Drupal\\acquia_contenthub\\Controller\\ContentHubReindex::reExportEntities',
[
$batch_size,
],
],
],
'finished' => 'acquia_contenthub_reexport_finished',
];
batch_set($batch);
}