public function BackgroundProcess::execute in Background Process 6
Same name and namespace in other branches
- 8 background_process.class.php \BackgroundProcess::execute()
- 7.2 background_process.inc \BackgroundProcess::execute()
- 7 BackgroundProcess.class.php \BackgroundProcess::execute()
1 call to BackgroundProcess::execute()
- BackgroundProcess::start in ./BackgroundProcess.class.php
- Start background process
File
- ./BackgroundProcess.class.php, line 161
- Class for handling background processes.
Class
- BackgroundProcess
- BackgroundProcess class.
Code
public function execute($callback, $args = array()) {
$this->callback = $callback;
if (!background_process_set_process($this->handle, $callback, $this->uid, $args, $this->token)) {
return NULL;
}
module_invoke_all('background_process_pre_execute', $this->handle, $callback, $args, $this->token);
progress_remove_progress($this->handle);
$this->connection = FALSE;
$this
->determineServiceHost();
return $this
->dispatch();
}