function background_process_remove_process in Background Process 8
Same name and namespace in other branches
- 6 background_process.module \background_process_remove_process()
- 7 background_process.module \background_process_remove_process()
Implements to Remove a background process.
4 calls to background_process_remove_process()
- BackgroundProcess::dispatch in ./
background_process.class.php - Implements to Dispatch Process.
- background_process_service_execute in ./
background_process.module - Implements to Execute the service.
- background_process_unlock in ./
background_process.module - Unlock background process.
- _background_process_cleanup_locks in ./
background_process.module - Implements to Shutdown handler for removing locks.
1 string reference to 'background_process_remove_process'
- background_process_service_execute in ./
background_process.module - Implements to Execute the service.
File
- ./
background_process.module, line 696 - This module implements a framework for calling funtions in the background.
Code
function background_process_remove_process($handle, $start = NULL) {
$old_db = Database::setActiveConnection('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();
}
Database::setActiveConnection($old_db);
return $result;
}