function background_process_remove_process in Background Process 7
Same name and namespace in other branches
- 8 background_process.module \background_process_remove_process()
- 6 background_process.module \background_process_remove_process()
Remove a background process.
Parameters
string $handle: Handle of background process
Return value
mixed Number of handles deleted on success, FALSE on failure.
4 calls to background_process_remove_process()
- BackgroundProcess::dispatch in ./
BackgroundProcess.class.php - background_process_service_execute in ./
background_process.module - Execute the service.
- background_process_unlock in ./
background_process.module - Unlock background process.
- _background_process_cleanup_locks in ./
background_process.module - Shutdown handler for removing locks.
1 string reference to 'background_process_remove_process'
- background_process_service_execute in ./
background_process.module - Execute the service.
File
- ./
background_process.module, line 839
Code
function background_process_remove_process($handle, $start = NULL) {
$old_db = db_set_active('background_process');
if (isset($start)) {
$result = db_delete('background_process')
->condition('handle', $handle)
->condition('start_stamp', sprintf("%.06f", $start), '=')
->execute();
}
else {
$result = db_delete('background_process')
->condition('handle', $handle)
->execute();
}
db_set_active($old_db);
return $result;
}