Commit 4cd1bc23 authored by Michael Salim's avatar Michael Salim
Browse files

added "wait for parents" field to BalsamJobs

parent 6672de77
......@@ -91,7 +91,8 @@ def check_parents(job, lock):
job.refresh_from_db()
parents = job.get_parents()
ready = all(p.state == 'JOB_FINISHED' for p in parents)
if ready:
if ready or not job.wait_for_parents:
lock.acquire()
job.update_state('READY', 'dependencies satisfied')
lock.release()
......
......@@ -216,6 +216,9 @@ class BalsamJob(models.Model):
help_text='A script that is run in a job working directory after the job has completed.'
' If blank, will default to the default_postprocess script defined for the application.',
default='')
wait_for_parents = models.BooleanField(
'If True, do not process this job until parents are FINISHED',
default=True)
post_error_handler = models.BooleanField(
'Let postprocesser try to handle RUN_ERROR',
help_text='If true, the postprocessor will be invoked for RUN_ERROR jobs'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment