You are here

function background_process_update_status in Background Process 7.2

Same name and namespace in other branches
  1. 8 background_process.module \background_process_update_status()
  2. 6 background_process.module \background_process_update_status()
  3. 7 background_process.module \background_process_update_status()

Update background process status

Parameters

$handle: Handle of background process

$status: Status to set for the background process

Return value

object Background process

File

./background_process.module, line 802

Code

function background_process_update_status($handle, $status) {
  $process = BackgroundProcess::loadByHandle($handle);
  $process
    ->setStatus($status)
    ->writeData();
  return $process;
}