dstandish commented on a change in pull request #19539:
URL: https://github.com/apache/airflow/pull/19539#discussion_r747714386
##########
File path: docs/apache-airflow/concepts/deferring.rst
##########
@@ -67,13 +67,13 @@ Triggering Deferral
If you want to trigger deferral, at any place in your Operator you can call
``self.defer(trigger, method_name, kwargs, timeout)``, which will raise a
special exception that Airflow will catch. The arguments are:
* ``trigger``: An instance of a Trigger that you wish to defer on. It will be
serialized into the database.
-* ``method_name``: The method name on your Operator you want Airflow to call
when it resumes, other than ``execute``.
+* ``method_name``: The method name on your Operator you want Airflow to call
when it resumes.
* ``kwargs``: Additional keyword arguments to pass to the method when it is
called. Optional, defaults to ``{}``.
* ``timeout``: A timedelta that specifies a timeout after which this deferral
will fail, and fail the task instance. Optional, defaults to ``None``, meaning
no timeout.
When you opt to defer, your Operator will *stop executing at that point and be
removed from its current worker*. No state - such as local variables, or
attributes set on ``self`` - will persist, and when your Operator is resumed it
will be a *brand new instance* of it. The only way you can pass state from the
old instance of the Operator to the new one is via ``method_name`` and
``kwargs``.
-When your Operator is resumed, you will find an ``event`` item added to the
kwargs passed to it, which contains the payload from the trigger event that
resumed your Operator. Depending on the trigger, this may be useful to your
operator (e.g. it's a status code or URL to fetch results), or it may not be
important (it's just a datetime). Your ``method_name`` method, however, *must*
accept ``event`` as a keyword argument.
Review comment:
to `it` sounds like to `the operator` but it's to `the method`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]