Lee-W commented on code in PR #50864:
URL: https://github.com/apache/airflow/pull/50864#discussion_r2099447278
##########
airflow-core/docs/authoring-and-scheduling/deferring.rst:
##########
@@ -36,14 +36,14 @@ You can either use pre-written deferrable operators as a
DAG author or write you
Using Deferrable Operators
--------------------------
-If you want to use pre-written deferrable operators that come with Airflow,
such as ``TimeSensorAsync``, then you only need to complete two steps:
+If you want to use pre-written deferrable operators that come with Airflow,
such as ``TimeSensor``, then you only need to complete two steps:
* Ensure your Airflow installation runs at least one ``triggerer`` process, as
well as the normal ``scheduler``
* Use deferrable operators/sensors in your dags
Airflow automatically handles and implements the deferral processes for you.
-If you're upgrading existing dags to use deferrable operators, Airflow
contains API-compatible sensor variants, like ``TimeSensorAsync`` for
``TimeSensor``. Add these variants into your DAG to use deferrable operators
with no other changes required.
+If you're upgrading existing dags to use deferrable operators, Airflow
contains API-compatible sensor variants. Add these variants into your DAG to
use deferrable operators with no other changes required.
Review Comment:
```suggestion
If you're upgrading existing dags to use deferrable operators, Airflow
contains API-compatible sensor variants. Add these variants into your dag to
use deferrable operators with no other changes required.
```
##########
providers/standard/src/airflow/providers/standard/sensors/time.py:
##########
@@ -96,36 +71,40 @@ class TimeSensorAsync(BaseSensorOperator):
)
start_from_trigger = False
- def __init__(
- self,
- *,
- target_time: datetime.time,
- start_from_trigger: bool = False,
- trigger_kwargs: dict[str, Any] | None = None,
- end_from_trigger: bool = False,
- **kwargs,
- ) -> None:
+ def __init__(self, *, target_time: datetime.time, deferrable: bool =
False, **kwargs) -> None:
Review Comment:
do we really need to remove `end_from_trigger` and `start_from_trigger`,
`trigger_kwargs` here?
--
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]