Here is my source:
function sc_delete_user_confirm_form_submit($form, &$form_state) {
//...
$batch = array(
'operations' => array(),
'finished' => 'user_delete_tickets_batch_finished',
'title' => t('Processing delete user tickets'),
'init_message' => t('Deleting user tickets is starting.'),
'progress_message' => t('Processing...'),
'error_message' => t('Deleting user tickets has encountered an error.'),
);
$batch['operations'][] = array('user_delete_tickets_batch_process', array());
batch_set($batch);
//...
}
function user_delete_tickets_batch_process(&$context) {
watchdog('my_module', 'user_delete_tickets_batch_process ENTER!', array(), WATCHDOG_ERROR);
//...
}
function user_delete_tickets_batch_finished($success, $results, $operations) {
watchdog(my_module', 'user_delete_tickets_batch_finished ENTER!', array(), WATCHDOG_ERROR);
//...
}
I see progress bar but it not call my callback method user_delete_tickets_batch_process
(I didn't see log in /admin/reports/dblog
), also it not call user_delete_tickets_batch_finished
.
What is wrong in this my source.