Mathijs Schoorl03/05/2021, 2:12 PM
nicholas03/05/2021, 4:03 PM
; does that make sense?
Mathijs Schoorl03/05/2021, 4:27 PM
will get the status TRIGGERFAIL when one of his upstream tasks fails. So in the end it will finish with a status and then my Task with trigger
will fire and set to a paused state instead of the TRIGGERFAIL I want.
nicholas03/05/2021, 4:34 PM
statement to control the instantiation of that task, something like this:
control_task = ControlTask(trigger=all_successful)(upstream_tasks=[fail_on_purpose]) with case(control_task, True): approve = ApproveTransfer(trigger=manual_only)(upstream_tasks=[control_task])
Mathijs Schoorl03/05/2021, 4:38 PM
nicholas03/05/2021, 4:41 PM
trigger_fn(upstream_states: Set[State]) -> bool
Mathijs Schoorl03/08/2021, 7:03 PM
def manual_trigger_adv(upstream_states: Dict["core.Edge", "state.State"]) -> bool: if not all(s.is_successful() for s in _get_all_states_as_set(upstream_states)): raise signals.TRIGGERFAIL( 'Trigger was "manual_only" but some of the upstream tasks failed.' ) if context.get("resume"): return True raise signals.PAUSE('Trigger function is "manual_only"')