Skip to content

Commit

Permalink
Doc entry
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Aug 21, 2015
1 parent 178a051 commit 0919ed0
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
25 changes: 25 additions & 0 deletions docs/concepts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -206,3 +206,28 @@ detailing the list of tasks that missed their SLA. The event is also recorded
in the database and made available in the web UI under ``Browse->Missed SLAs``
where events can be analyzed and documented.


Trigger Rules
'''''''''''''

Though the normal workflow behavior is to trigger tasks when all their
directly upstream tasks have succeeded, Airflow allows for more complex
dependency settings.

All operators have a ``trigger_rule`` argument which defines the rule by which
the generated task get triggered. The default value for ``trigger_rule`` is
``all_success`` and can be defined as "trigger this task when all directly
upstream tasks have succeeded". All other rules described here are based
on direct parent tasks and are values that can be passed to any operator
while creating tasks:

* ``all_success``: (default) all parents have succeeded
* ``all_failed``: all parents are in a ``failed`` or ``upstream_failed`` state
* ``all_done``: all parents are done with their execution
* ``one_failed``: at least one parent has failed
* ``one_success``: at least one parent has succeeded
* ``dummy``: dependencies are just for show, trigger at will

Note that these can be used in conjunction with ``depends_on_past`` (boolean)
that, when set to ``True``, keeps a task from getting triggered if the
previous schedule for the task hasn't succeeded.
7 changes: 7 additions & 0 deletions docs/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,10 @@ Here are some of the common causes:

You may also want to read the Scheduler section of the docs and make
sure you fully understand how it proceeds.


**How do I trigger tasks based on another task's failure?**

Check out the ``Trigger Rule`` section in the Concepts section of the
documentation

0 comments on commit 0919ed0

Please sign in to comment.