You are here

function background_process_queue in Background Process 6

Same name and namespace in other branches
  1. 8 background_process.module \background_process_queue()
  2. 7.2 background_process.module \background_process_queue()
  3. 7 background_process.module \background_process_queue()

Start background process

Queue the function call passing function arguments as serialized data Be aware that the callback will run in a new request

@global string $base_url Base URL for this Drupal request

Parameters

$callback: Function to call

$var [, $... ]]: Arbitrary number of variables to pass on to the callback

Return value

mixed Handle on success, FALSE on failure

File

./background_process.module, line 471

Code

function background_process_queue($callback) {
  $process = new BackgroundProcess();
  $args = func_get_args();
  array_splice($args, 0, 1);
  return $process
    ->queue($callback, $args);
}