function tripal_set_job_progress

2.x tripal_set_job_progress($job_id, $percentage)

An internal function for setting the progress for a current job


$job_id: The job_id to set the progress for

$percentage: The progress to set the job to

Return value

True on success and False otherwise

Related topics

14 calls to tripal_set_job_progress()
chado_cleanup_orphaned_nodes_part in tripal_core/api/
This function will delete Drupal nodes for any sync'ed table (e.g. feature, organism, analysis, stock, library) if the chado record has been deleted or the entry in the chado_[table] table has been removed.
chado_node_sync_records in tripal_core/api/
Generic function for syncing records in Chado with Drupal nodes.
chado_update_existing_node_urls in tripal_core/api/
Tripal Job for updating all node URLs for a particular node type.
tripal_analysis_set_feature_permission in tripal_analysis/includes/
Set permissions for features associated with an analysis @todo Stephen: ensure the $nid param is defined correctly
tripal_bulk_loader_load_data in tripal_bulk_loader/includes/
Tripal Bulk Loader

... See full list

1 string reference to 'tripal_set_job_progress'


tripal_core/api/, line 534
Tripal offers a job management subsystem for managing tasks that may require an extended period of time for completion.


function tripal_set_job_progress($job_id, $percentage) {

  if (preg_match("/^(\d+|100)$/", $percentage)) {
    $record = new stdClass();
    $record->job_id = $job_id;
    $record->progress = $percentage;
    if (drupal_write_record('tripal_jobs', $record, 'job_id')) {
      return TRUE;

  return FALSE;