taskapp/events/task.py
changeset 89 1cc03941ed5d
parent 74 7dc764854867
child 90 b2426897ff18
equal deleted inserted replaced
88:0b6d251d3c30 89:1cc03941ed5d
    30     main_task.save()
    30     main_task.save()
    31 
    31 
    32 def addDep(main_task, dependency):
    32 def addDep(main_task, dependency):
    33     """ add the dependency task to deps attribute of the task.
    33     """ add the dependency task to deps attribute of the task.
    34     update the status of main_task accordingly.
    34     update the status of main_task accordingly.
    35     note that deps can be added only if task is in UP/OP/LO/CD state.
    35     note that deps can be added only if task is in UP/OP/LO state.
    36     And also if the task doesn't have any subs.
    36     And also if the task doesn't have any subs.
    37     """
    37     """
    38 
    38 
    39     main_task.deps.add(dependency)
    39     main_task.deps.add(dependency)
    40     deps = main_task.deps.all()
    40     deps = main_task.deps.all()