Skip to content

Commit

Permalink
Replace deprecated module and operator in example_tasks.py (#13473)
Browse files Browse the repository at this point in the history
- `from airflow.operators.bash_operator import BashOperator` to `from airflow.operators.bash import BashOperator`
- `from airflow.utils.helpers import chain` to `from airflow.models.baseoperator import chain`
  • Loading branch information
kaxil committed Jan 5, 2021
1 parent c7d75ad commit 7d1ea4c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions airflow/providers/google/cloud/example_dags/example_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
from google.protobuf import timestamp_pb2

from airflow import models
from airflow.operators.bash_operator import BashOperator
from airflow.models.baseoperator import chain
from airflow.operators.bash import BashOperator
from airflow.providers.google.cloud.operators.tasks import (
CloudTasksQueueCreateOperator,
CloudTasksQueueDeleteOperator,
Expand All @@ -46,7 +47,6 @@
CloudTasksTasksListOperator,
)
from airflow.utils.dates import days_ago
from airflow.utils.helpers import chain

timestamp = timestamp_pb2.Timestamp()
timestamp.FromDatetime(datetime.now() + timedelta(hours=12)) # pylint: disable=no-member
Expand Down

0 comments on commit 7d1ea4c

Please sign in to comment.