*def ignore_timeout_handler*(task, old_state, new_state):
*if* new_state.is_failed() *and*
*return* state.Success(result=Box(status="TimeOut", stdout="", stderr=""))
combined = combine.
combine = prefect.task(*lambda* first, second: Box(**first, **second))
DumpResultsTask(combined, "all") good_hosts_filter = FilterTask(filter_func=
DumpResultsTask(good_hosts_filter(combined), "only good with info from datadomain as test") bad_hosts_filter = FilterTask(filter_func=
*lambda* x: x.status == "OK")
DumpResultsTask(bad_hosts_filter(combined), "only bad to email or tell someone") The issue is I do this so many times when, if the handler could get some more info I would never need the code again.
*lambda* x: x.status != "OK")
and there is only one, maybe two, transitions for which "inputs" are even a meaningful and known quantity. Rephrased, state handlers are hooks that operate in the surface area around your task as an isolated unit (including all the times the task is not able to run and doesn't even have inputs). With all feature requests we need to be able to have an open conversation about the desired outcome because, as is the case here, your intended goal is not actually compatible with the current concept of state handlers so a new hook or a re-imagining is needed. This conversation can be difficult to have when it begins with "This feature is useless" 🙂