function tripal_get_job

2.x tripal_core.jobs.api.inc tripal_get_job($job_id)
3.x tripal.jobs.api.inc tripal_get_job($job_id)

Retrieve information regarding a tripal job

Parameters

$job_id: The unique identifier of the job

Return value

An object representing a record from the tripal_job table or FALSE on failure.

Related topics

1 call to tripal_get_job()
tripal_jobs_status_view in tripal/includes/tripal.jobs.inc
Runs a Tripal job from within the request.

File

tripal/api/tripal.jobs.api.inc, line 136
Tripal offers a job management subsystem for managing tasks that may require an extended period of time for completion.

Code

function tripal_get_job($job_id) {
  try {
    $job = new TripalJob();
    $job->load($job_id);
    return $job->getJob();
  }
  catch (Exception $e) {
    tripal_report_error('tripal', TRIPAL_ERROR, $e->getMessage());
    drupal_set_message($e->getMessage(), 'error');
    return FALSE;
  }
}