From 6e189c74628ee5827f1495df801fb46d6e88566c Mon Sep 17 00:00:00 2001 From: Atul Singh Date: Thu, 26 Jun 2025 11:52:56 +0530 Subject: [PATCH] fixing deprecated import --- .../example_dags/example_time_delta_sensor_async.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/airflow-core/src/airflow/example_dags/example_time_delta_sensor_async.py b/airflow-core/src/airflow/example_dags/example_time_delta_sensor_async.py index 7b847e6871e37..726fa2cf5c5df 100644 --- a/airflow-core/src/airflow/example_dags/example_time_delta_sensor_async.py +++ b/airflow-core/src/airflow/example_dags/example_time_delta_sensor_async.py @@ -16,8 +16,7 @@ # specific language governing permissions and limitations # under the License. """ -Example DAG demonstrating ``TimeDeltaSensorAsync``, a drop in replacement for ``TimeDeltaSensor`` that -defers and doesn't occupy a worker slot while it waits +Example DAG demonstrating ``TimeDeltaSensor``, that defers and doesn't occupy a worker slot while it waits """ from __future__ import annotations @@ -27,7 +26,7 @@ import pendulum from airflow.providers.standard.operators.empty import EmptyOperator -from airflow.providers.standard.sensors.time_delta import TimeDeltaSensorAsync +from airflow.providers.standard.sensors.time_delta import TimeDeltaSensor from airflow.sdk import DAG with DAG( @@ -37,6 +36,6 @@ catchup=False, tags=["example"], ) as dag: - wait = TimeDeltaSensorAsync(task_id="wait", delta=datetime.timedelta(seconds=30)) + wait = TimeDeltaSensor(task_id="wait", delta=datetime.timedelta(seconds=30), deferrable=True) finish = EmptyOperator(task_id="finish") wait >> finish