function background_process_set_service_host in Background Process 7
Same name and namespace in other branches
- 8 background_process.module \background_process_set_service_host()
- 6 background_process.module \background_process_set_service_host()
Set a service host for a background process.
Parameters
string $handle: Background process handle
string $service_host: Name of service host
1 call to background_process_set_service_host()
File
- ./
background_process.module, line 884
Code
function background_process_set_service_host($handle, $service_host) {
try {
$old_db = db_set_active('background_process');
$result = db_update('background_process')
->fields(array(
'service_host' => $service_host ? $service_host : '',
))
->condition('handle', $handle)
->execute();
db_set_active($old_db);
return $result;
} catch (Exception $e) {
db_set_active($old_db);
throw $e;
}
}