File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
airflow-core/src/airflow/example_dags Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 16
16
# specific language governing permissions and limitations
17
17
# under the License.
18
18
"""
19
- Example DAG demonstrating ``TimeDeltaSensorAsync``, a drop in replacement for ``TimeDeltaSensor`` that
20
- defers and doesn't occupy a worker slot while it waits
19
+ Example DAG demonstrating ``TimeDeltaSensor``, that defers and doesn't occupy a worker slot while it waits
21
20
"""
22
21
23
22
from __future__ import annotations
27
26
import pendulum
28
27
29
28
from airflow .providers .standard .operators .empty import EmptyOperator
30
- from airflow .providers .standard .sensors .time_delta import TimeDeltaSensorAsync
29
+ from airflow .providers .standard .sensors .time_delta import TimeDeltaSensor
31
30
from airflow .sdk import DAG
32
31
33
32
with DAG (
37
36
catchup = False ,
38
37
tags = ["example" ],
39
38
) as dag :
40
- wait = TimeDeltaSensorAsync (task_id = "wait" , delta = datetime .timedelta (seconds = 30 ))
39
+ wait = TimeDeltaSensor (task_id = "wait" , delta = datetime .timedelta (seconds = 30 ), deferrable = True )
41
40
finish = EmptyOperator (task_id = "finish" )
42
41
wait >> finish
You can’t perform that action at this time.
0 commit comments