function background_process_service_start in Background Process 7.2
Same name and namespace in other branches
- 8 background_process.module \background_process_service_start()
- 6 background_process.module \background_process_service_start()
- 7 background_process.module \background_process_service_start()
Call the function requested by the service call
Parameters
$callback: Function to call
1 string reference to 'background_process_service_start'
- background_process_menu in ./
background_process.module - Implements hook_menu().
File
- ./
background_process.module, line 564
Code
function background_process_service_start($pid) {
// Let's clean up the mess the menu-router system leaves behind.
$cid = 'menu_item:' . hash('sha256', $_GET['q']);
drupal_register_shutdown_function('cache_clear_all', $cid, 'cache_menu');
$process = BackgroundProcess::load($pid);
if (!$process) {
watchdog('bg_process', 'Unknown process: %pid', array(
'%pid' => $pid,
), WATCHDOG_ERROR);
}
$process
->execute();
exit;
}