function tripal_core_job_describe_args

2.x tripal_core.module tripal_core_job_describe_args($callback, $args)
1.x tripal_core.module tripal_core_job_describe_args($callback, $args)

Implements hook_job_describe_args(). Describes the arguements for the tripal_update_mview job to allow for greater readability in the jobs details pages.

Parameters

$callback: The callback of the current tripal job (this is the function that will be executed when tripal_launch_jobs.php is run.

$args: An array of arguments passed in when the job was registered.

Return value

A more readable $args array

Related topics

File

tripal_core/tripal_core.module, line 330
The Tripal Core module

Code

function tripal_core_job_describe_args($callback, $args) {
  $new_args = array();
  if ($callback == 'tripal_update_mview') {
    // get this mview details
    $sql = "SELECT * FROM {tripal_mviews} WHERE mview_id = %d ";
    $mview = db_fetch_object(db_query($sql, $args[0]));
    $new_args['View Name'] = $mview->name;
  }

  elseif ($callback == 'tripal_core_install_chado') {
    $new_args['Action'] = $args[0];
  }
  return $new_args;
}