Triggers


Triggers are functions that determine if task state should change based on the state of preceding tasks.

Functions

top-level functions:                                                                                                                                                       

prefect.triggers.all_finished

(upstream_states)[source]

This task will run no matter what the upstream states are, as long as they are finished.

Args:

  • upstream_states (set[State]): the set of all upstream states

prefect.triggers.manual_only

(upstream_states)[source]

This task will never run automatically, because this trigger will always place the task in a Paused state. The only exception is if the "resume" keyword is found in the Prefect context, which happens automatically when a task starts in a Resume state.

Args:

  • upstream_states (set[State]): the set of all upstream states

prefect.triggers.all_finished

(upstream_states)[source]

This task will run no matter what the upstream states are, as long as they are finished.

Args:

  • upstream_states (set[State]): the set of all upstream states

prefect.triggers.all_successful

(upstream_states)[source]

Runs if all upstream tasks were successful. Note that SKIPPED tasks are considered successes and TRIGGER_FAILED tasks are considered failures.

Args:

  • upstream_states (set[State]): the set of all upstream states

prefect.triggers.all_failed

(upstream_states)[source]

Runs if all upstream tasks failed. Note that SKIPPED tasks are considered successes and TRIGGER_FAILED tasks are considered failures.

Args:

  • upstream_states (set[State]): the set of all upstream states

prefect.triggers.any_successful

(upstream_states)[source]

Runs if any tasks were successful. Note that SKIPPED tasks are considered successes and TRIGGER_FAILED tasks are considered failures.

Args:

  • upstream_states (set[State]): the set of all upstream states

prefect.triggers.any_failed

(upstream_states)[source]

Runs if any tasks failed. Note that SKIPPED tasks are considered successes and TRIGGER_FAILED tasks are considered failures.

Args:

  • upstream_states (set[State]): the set of all upstream states

This documentation was auto-generated from commit n/a
by Prefect 0.5.0 on March 29, 2019 at 17:39 UTC