|  | @@ -45,6 +45,10 @@
 | 
											
												
													
														|  |   *    An array of paths to files that should be included in order to execute
 |  |   *    An array of paths to files that should be included in order to execute
 | 
											
												
													
														|  |   *    the job. Use the module_load_include function to get a path for a given
 |  |   *    the job. Use the module_load_include function to get a path for a given
 | 
											
												
													
														|  |   *    file.
 |  |   *    file.
 | 
											
												
													
														|  | 
 |  | + * @param $ignore_duplicate.
 | 
											
												
													
														|  | 
 |  | + *   Set to TRUE to not add the job if it has
 | 
											
												
													
														|  | 
 |  | + *   the same name as another job which has not yet run. The default is TRUE.
 | 
											
												
													
														|  | 
 |  | + *
 | 
											
												
													
														|  |   * @return
 |  |   * @return
 | 
											
												
													
														|  |   *    The job_id of the registered job, or FALSE on failure.
 |  |   *    The job_id of the registered job, or FALSE on failure.
 | 
											
												
													
														|  |   *
 |  |   *
 | 
											
										
											
												
													
														|  | @@ -71,7 +75,7 @@
 | 
											
												
													
														|  |   * @ingroup tripal_jobs_api
 |  |   * @ingroup tripal_jobs_api
 | 
											
												
													
														|  |   */
 |  |   */
 | 
											
												
													
														|  |  function tripal_add_job($job_name, $modulename, $callback, $arguments, $uid,
 |  |  function tripal_add_job($job_name, $modulename, $callback, $arguments, $uid,
 | 
											
												
													
														|  | -    $priority = 10, $includes = array()) {
 |  | 
 | 
											
												
													
														|  | 
 |  | +    $priority = 10, $includes = array(), $ignore_duplicate = TRUE) {
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |    $user = user_load($uid);
 |  |    $user = user_load($uid);
 | 
											
												
													
														|  |  
 |  |  
 | 
											
										
											
												
													
														|  | @@ -85,6 +89,7 @@ function tripal_add_job($job_name, $modulename, $callback, $arguments, $uid,
 | 
											
												
													
														|  |        'uid' => $uid,
 |  |        'uid' => $uid,
 | 
											
												
													
														|  |        'priority' => $priority,
 |  |        'priority' => $priority,
 | 
											
												
													
														|  |        'includes' => $includes,
 |  |        'includes' => $includes,
 | 
											
												
													
														|  | 
 |  | +      'ignore_duplicate' => $ignore_duplicate,
 | 
											
												
													
														|  |      ));
 |  |      ));
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      if ($is_created) {
 |  |      if ($is_created) {
 |