-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
`days_ago` is going to be deprecated and removed. Vote: https://lists.apache.org/thread/qfqjb8m3v834yc8mxo1oqtjddhp9sggk PR: apache/airflow#21796 Issue: apache/airflow#21683
- Loading branch information
1 parent
bbf84ba
commit 3c09756
Showing
11 changed files
with
39 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
astronomer/providers/amazon/aws/example_dags/example_redshift_sql.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
astronomer/providers/cncf/kubernetes/example_dags/example_kubernetes_pod_operator.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 5 additions & 7 deletions
12
astronomer/providers/core/example_dags/example_external_task_wait_for_me.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,18 @@ | ||
import datetime | ||
from datetime import timedelta | ||
|
||
from airflow import DAG | ||
from airflow.models.dag import DAG | ||
from airflow.operators.dummy import DummyOperator | ||
from airflow.sensors.time_sensor import TimeSensorAsync | ||
from airflow.utils.dates import days_ago | ||
from airflow.utils.timezone import utcnow | ||
from airflow.utils.timezone import datetime, utcnow | ||
|
||
default_args = {"start_date": days_ago(0)} | ||
with DAG( | ||
"test_external_task_async_waits_for_me", | ||
schedule_interval="@daily", | ||
default_args=default_args, | ||
start_date=datetime(2022, 1, 1), | ||
) as dag: | ||
wait_for_me = TimeSensorAsync( | ||
task_id="wait_for_me", | ||
target_time=utcnow() + datetime.timedelta(seconds=3), | ||
target_time=utcnow() + timedelta(seconds=3), | ||
) | ||
complete = DummyOperator(task_id="complete") | ||
wait_for_me >> complete |
11 changes: 8 additions & 3 deletions
11
astronomer/providers/core/example_dags/example_file_sensor.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters