You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: airflow-core/docs/authoring-and-scheduling/deferring.rst
+26-22Lines changed: 26 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -493,6 +493,8 @@ According to `benchmarks <https://github.com/apache/airflow/pull/58803#pullreque
493
493
494
494
You can determine a suitable value for your deployment by creating a large number of triggers (for example, by triggering a Dag with many deferrable tasks) and observing both how the load is distributed across Triggerers in your environment and how long it takes for all Triggerers to pick up the triggers.
495
495
496
+
.. _deferring/triggerer_queue_assignment:
497
+
496
498
Controlling Triggerer Host Assignment Per Trigger
497
499
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
498
500
@@ -508,7 +510,7 @@ Under some circumstances, it may be desirable to assign a Trigger to a specific
508
510
If you are using :doc:`Multi-Team mode</core-concepts/multi-team>`, the ``--team-name`` option provides
509
511
native team-scoped triggerer assignment for all trigger types (task-created, event-driven, and callback).
510
512
See :ref:`Team-scoped Triggerer <multi-team-triggerer>` in the Multi-Team documentation.
511
-
The ``--queues`` option described below is an older, queue-based mechanism that can be combined with
513
+
The ``--queues`` option described below is a distinct queue-based mechanism which may be combined with
512
514
``--team-name`` if needed.
513
515
514
516
To enable queue assignment for triggers, do the following:
@@ -536,33 +538,35 @@ This feature is only compatible with executors which utilize the task ``queue``
|:doc:`Event-Driven Triggers<../authoring-and-scheduling/event-scheduling>` | Yes | Any triggerer whose ``--queues`` includes the trigger's ``queue``, or any |
550
-
||| triggerer without ``--queues`` if no ``queue`` was set |
| Triggers from async :doc:`Callbacks<../administration-and-deployment/logging-monitoring/callbacks>` | No | Any triggerer running without the ``--queues`` option |
|:doc:`Event-Driven Triggers<../authoring-and-scheduling/event-scheduling>` | Any triggerer whose ``--queues`` includes the trigger's ``queue``, or any |
551
+
|| triggerer without ``--queues`` if no ``queue`` was set |
| Triggers from async :doc:`Callbacks<../administration-and-deployment/logging-monitoring/callbacks>` | Any triggerer whose ``--queues`` includes the callback's ``queue``, or any |
554
+
|| triggerer without ``--queues`` if no ``queue`` was set |
If you run a mix of triggers with queues **and** without queues assigned, (of any trigger type), you must run at least one triggerer host
557
558
**without** the ``--queues`` option, so the latter are still run.
558
559
559
560
.. note::
560
561
To enable trigger queues, you must set the ``--queues`` option on one or more triggerers' startup command (these values may differ between the various triggerers).
561
-
If you set the ``--queue`` value of a triggerer to some value which no task queues or event-driven trigger queues exist for, that triggerer will never run any triggers.
562
-
Similarly, all ``triggerer`` instances running without the ``--queues`` option will only consume callback-based triggers and event-driven triggers that were not assigned an explicit ``queue``.
562
+
If you set the ``--queue`` value of a triggerer to some value which no triggers are assigned (either from their task queue, or from their explicit ``queue`` field), then that triggerer
563
+
will never run any triggers. Similarly, all triggerer instances running without the ``--queues`` option will only consume callback-based triggers and event-driven triggers that were not
564
+
assigned an explicit ``queue``.
563
565
564
566
An event-driven trigger's ``queue`` is set once, when the trigger is registered for an
565
-
:class:`~airflow.sdk.AssetWatcher` during Dag processing, and is independent of
567
+
:class:`~airflow.sdk.AssetWatcher` during Dag processing. A callback trigger's ``queue`` is set
568
+
from the ``queue`` passed to :class:`~airflow.sdk.AsyncCallback` when the deadline is missed and the
569
+
callback is queued on the Triggerer. Both are independent of
566
570
:doc:`Multi-Team mode</core-concepts/multi-team>`'s ``team_name`` scoping — the two can be
0 commit comments