You are here

function background_process_get_process in Background Process 6

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

Get background process

Parameters

$handle: Handle of background process

Return value

object Background process

10 calls to background_process_get_process()
BackgroundProcess::lock in ./BackgroundProcess.class.php
background_process_ass_cron_alter in background_process_ass/background_process_ass.module
Implements hook_cron_alter().
background_process_cron_alter in ./background_process.module
Implements hook_cron_alter().
background_process_keepalive in ./background_process.module
Keep the current background process alive (meaning restart it when it exits)
background_process_service_access in ./background_process.module
Access handler for service call

... See full list

File

./background_process.module, line 722

Code

function background_process_get_process($handle) {
  if ($result = db_fetch_object(db_query("SELECT handle, callback, args, uid, token, service_host, start_stamp, exec_status FROM {background_process} WHERE handle = '%s'", $handle))) {
    $result->args = unserialize($result->args);
    $result->callback = unserialize($result->callback);
    $result->start = $result->start_stamp;
    $result->status = $result->exec_status;
  }
  return $result;
}