function background_process_lock_process in Background Process 6
Same name and namespace in other branches
- 8 background_process.module \background_process_lock_process()
- 7 background_process.module \background_process_lock_process()
Lock process
Parameters
$handle: Handle of background process
Return value
boolean TRUE if locked, FALSE if lock could not be obtained
1 call to background_process_lock_process()
File
- ./
background_process.module, line 697
Code
function background_process_lock_process($handle, $status = BACKGROUND_PROCESS_STATUS_LOCKED) {
if (!@db_query("INSERT INTO {background_process} (handle, start_stamp, exec_status) VALUES('%s', '%s', %d)", $handle, sprintf("%.06f", microtime(TRUE)), $status)) {
return FALSE;
}
else {
_background_process_ensure_cleanup($handle);
return TRUE;
}
}