function acquia_lift_batch_sync_all in Acquia Lift Connector 7.2
Batch syncs the nested tests for all agents.
Return value
bool Returns TRUE if batch syncing completed successfully, FALSE otherwise.
1 call to acquia_lift_batch_sync_all()
- acquia_lift_batch_sync_form_submit in ./
acquia_lift.admin.inc - Submit callback for the batch sync form.
File
- ./
acquia_lift.batch.inc, line 43 - acquia_lift.batch.inc
Code
function acquia_lift_batch_sync_all() {
$agents = personalize_agent_load_by_type('acquia_lift_target');
$operations = array();
foreach ($agents as $agent) {
try {
$operations += acquia_lift_get_sync_operations_for_agent($agent);
} catch (AcquiaLiftException $e) {
// Something went wrong getting all necessary batch operations for this
// agent, just skip it and sync the next one.
drupal_set_message(t('Could not sync the @agent personalization, most likely due to missing goals or variations.', array(
'@agent' => $agent->machine_name,
)), 'warning');
continue;
}
}
acquia_lift_do_batch_sync($operations);
}