Vaibhav Ariyur
12/02/2021, 8:10 PMon_failure
param of a flow? Should the function called by on_failure
be able to read your flow's results?Kevin Kho
def st_handler(task, old_state, new_state):
...
You can try doing new_state.result
to get the result. What kind of parameters are you trying to pass?Vaibhav Ariyur
12/02/2021, 8:14 PMdef *clean_on_failure*(flow: *Flow*, state: *State*)
and I am trying to pass the directory to removeVaibhav Ariyur
12/02/2021, 8:15 PMKevin Kho
flow.run()
you will see them but when running with a backend (Server or Cloud), they are not stored.Vaibhav Ariyur
12/02/2021, 8:20 PMVaibhav Ariyur
12/02/2021, 8:21 PMKevin Kho
Vaibhav Ariyur
12/02/2021, 8:28 PMVaibhav Ariyur
12/02/2021, 8:30 PMKevin Kho
Kevin Kho
prefect.context.parameters
Vaibhav Ariyur
12/02/2021, 8:37 PMVaibhav Ariyur
12/02/2021, 8:38 PMKevin Kho
def st_handler(flow, old_state, new_state):
myparam = prefect.context.parameters.get("myparam")
something like thisVaibhav Ariyur
12/02/2021, 8:43 PMVaibhav Ariyur
12/02/2021, 8:43 PMKevin Kho