Max Kolasinski
11/19/2021, 9:31 PMall_failed
or any_failed
- if the ETL Task fails, it shouldn’t run. What I believe I would need is something like an on_x_task_failed
option- it seems like the available options are way too broad to be useful.
• I then looked into some of the ideas on the Conditional Logic page, but this seems clumsy for a few reasons. I need a Task specifically to check the State of the Validation Task, and then on our Schematic View we have additional Tasks showing up for each Case Task as well as the Merge Task. All combined, it makes our Schematic look like the image below which seems crazy for what is effectively if x do y
.
I feel like I have to be approaching this in completely the wrong way- if anyone had any ideas or suggestions I would be extremely grateful.Kevin Kho
Max Kolasinski
11/19/2021, 9:40 PMKevin Kho
def mystatehandler(task, old_state_new_state):
if new_state.is_failed():
SlackTask(message="test message").run()
return new_state
@task(state_handlers=[mystatehandler])
def test():
return 1
Kevin Kho
@task(state_handlers=[mystatehandler])
def test():
x = "some variable"
return 1
the mystatehandler
will not be able to access xMax Kolasinski
11/19/2021, 9:47 PMAndrew Black
11/20/2021, 6:14 PM