Justin Mooney
07/31/2020, 8:10 PMChris White
07/31/2020, 8:40 PMsetup
task which you can then call the various task methods on:
with MyResource(...) as resource:
resource.set_upstream(other_task)
It sounds like you want to create a dependency on the init task, which you can do by accessing this task as an attribute of the resource object:
my_resource = MyResource(...)
my_resource.init_task.set_upstream(other_task)
with my_resource:
...
Justin Mooney
07/31/2020, 8:53 PMChris White
07/31/2020, 8:54 PMfirst_resource = FirstResource(...)
second_resource = SecondResource(...)
second_resource.init_task.set_upstream(first_resource.cleanup_task)
Justin Mooney
07/31/2020, 8:55 PMChris White
07/31/2020, 8:55 PMwith first_resource as resource:
...
with second_resource as another_resource:
...
Justin Mooney
07/31/2020, 8:58 PMChris White
07/31/2020, 8:58 PMMarvin
07/31/2020, 8:58 PM