Tripal Jobs API

  1. 2.x tripal_core/api/tripal_core.jobs.api.inc tripal_jobs_api
  2. 3.x tripal/api/tripal.jobs.api.inc tripal_jobs_api
  3. 1.x tripal_core/api/tripal_core_jobs.api.inc tripal_jobs_api

Tripal offers a job management subsystem for managing tasks that may require an extended period of time for completion. Drupal uses a UNIX-based cron job to handle tasks such as checking the availability of updates, indexing new nodes for searching, etc. Drupal's cron uses the web interface for launching these tasks, however, Tripal provides several administrative tasks that may time out and not complete due to limitations of the web server. Examples including syncing of a large number of features between chado and Drupal. To circumvent this, as well as provide more fine-grained control and monitoring, Tripal uses a jobs management sub-system built into the Tripal Core module. It is anticipated that this functionality will be used for managing analysis jobs provided by future tools, with eventual support for distributed computing.

The Tripal jobs management system allows administrators to submit tasks to be performed which can then be launched through a UNIX command-line PHP script or cron job. This command-line script can be added to a cron entry along-side the Drupal cron entry for automatic, regular launching of Tripal jobs. The order of execution of waiting jobs is determined first by priority and second by the order the jobs were entered.

The API functions described below provide a programmatic interface for adding, checking and viewing jobs.

File

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

Functions

Namesort descending Location Description
tripal_add_job tripal_core/api/tripal_core.jobs.api.inc Adds a job to the Tripal Jbo queue
tripal_cancel_job tripal_core/api/tripal_core.jobs.api.inc Cancel a Tripal Job currently waiting in the job queue
tripal_get_active_jobs tripal_core/api/tripal_core.jobs.api.inc Returns a list of jobs that are active.
tripal_get_job tripal_core/api/tripal_core.jobs.api.inc Retrieve information regarding a tripal job
tripal_get_job_end tripal_core/api/tripal_core.jobs.api.inc Returns the end time for a given job
tripal_get_job_start tripal_core/api/tripal_core.jobs.api.inc Returns the start time for a given job
tripal_get_job_submit_date tripal_core/api/tripal_core.jobs.api.inc Returns the date the job was added to the queue
tripal_is_job_running tripal_core/api/tripal_core.jobs.api.inc Indicates if any jobs are running.
tripal_launch_job tripal_core/api/tripal_core.jobs.api.inc A function used to manually launch all queued tripal jobs
tripal_max_jobs_exceeded tripal_core/api/tripal_core.jobs.api.inc Check for too many concurrent jobs
tripal_rerun_job tripal_core/api/tripal_core.jobs.api.inc Set a job to be re-ran (ie: add it back into the job queue)