function mongodb_batch_alter in MongoDB 8
Implements hook_batch_alter().
File
- ./
mongodb.module, line 25 - MongoDB core module.
Code
function mongodb_batch_alter(&$batch) {
foreach ($batch['sets'] as $key => &$batch_set) {
if (isset($batch_set['operations']) && !isset($batch_set['queue'])) {
$batch_set += array(
'queue' => array(
'name' => 'drupal_batch:' . microtime(TRUE) . ':' . $key,
'class' => $batch['progressive'] ? 'Drupal\\mongodb\\BatchQueueMongodb' : 'Drupal\\Core\\Queue\\BatchMemory',
),
);
}
}
}