function acquia_lift_do_batch_sync in Acquia Lift Connector 7.2
Performs batch syncing, given an array of operations.
Parameters
$operations:
2 calls to acquia_lift_do_batch_sync()
- acquia_lift_batch_sync_all in ./
acquia_lift.batch.inc - Batch syncs the nested tests for all agents.
- acquia_lift_batch_sync_tests_for_agent in ./
acquia_lift.batch.inc - Batch syncs the nested tests for the specified agent.
File
- ./
acquia_lift.batch.inc, line 65 - acquia_lift.batch.inc
Code
function acquia_lift_do_batch_sync($operations, $finished = 'acquia_lift_batch_finished') {
if (empty($operations)) {
$finished(TRUE, array(), array(), 0);
return;
}
$batch_operations = array();
foreach ($operations as $operation) {
$batch_operations[] = array(
'acquia_lift_batch_process_item',
array(
$operation,
),
);
}
$batch = array(
'operations' => $batch_operations,
'finished' => $finished,
'title' => t('Syncing personalization components to Acquia Lift'),
'init_message' => t('Starting personalization sync.'),
'progress_message' => t('Processed @current out of @total.'),
'error_message' => t('Lift personalization sync has encountered an error.'),
'file' => drupal_get_path('module', 'acquia_lift') . '/acquia_lift.batch.inc',
);
batch_set($batch);
}