function background_process_service_start in Background Process 7
Same name and namespace in other branches
- 8 background_process.module \background_process_service_start()
- 6 background_process.module \background_process_service_start()
- 7.2 background_process.module \background_process_service_start()
Call the function requested by the service call.
Parameters
string $handle: Raw URL encoded handle of process
bool $return: Whether or not the function should return or exit.
1 string reference to 'background_process_service_start'
- background_process_menu in ./
background_process.module - Implements hook_menu().
File
- ./
background_process.module, line 501
Code
function background_process_service_start($handle, $return = FALSE) {
drupal_add_http_header('Content-Type', 'text/plain');
// Let's clean up the mess the menu-router system leaves behind.
$cid = 'menu_item:' . hash('sha256', $_GET['q']);
drupal_register_shutdown_function('_background_process_cleanup_menu', $cid);
// Setup service.
ignore_user_abort(TRUE);
@set_time_limit(variable_get('background_process_service_timeout', BACKGROUND_PROCESS_SERVICE_TIMEOUT));
// Damn those slashes!
$handle = rawurldecode($handle);
return background_process_service_execute($handle, $return);
}