Commit 7ed4ee1f authored by Manuel Günther's avatar Manuel Günther

Disallowed self-dependency of jobs.

parent 14cb0de3
......@@ -333,6 +333,9 @@ def add_job(session, command_line, name = 'job', dependencies = [], array = None
job.id = job.unique
for d in dependencies:
if d == job.unique:
logger.warn("Adding self-dependency of job %d is not allowed" % d)
continue
depending = list(session.query(Job).filter(Job.unique == d))
if len(depending):
session.add(JobDependence(job.unique, depending[0].unique))
......
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