Skip to content

Commit

Permalink
Add env variables to PubSub example dag (#13794)
Browse files Browse the repository at this point in the history
Add env variables to PubSub example dag to help parametrize system tests
  • Loading branch information
Tobiasz Kędzierski committed Jan 27, 2021
1 parent 7f4c88c commit 6616617
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions airflow/providers/google/cloud/example_dags/example_pubsub.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
from airflow.utils.dates import days_ago

GCP_PROJECT_ID = os.environ.get("GCP_PROJECT_ID", "your-project-id")
TOPIC_FOR_SENSOR_DAG = "PubSubSensorTestTopic"
TOPIC_FOR_OPERATOR_DAG = "PubSubOperatorTestTopic"
TOPIC_FOR_SENSOR_DAG = os.environ.get("GCP_PUBSUB_SENSOR_TOPIC", "PubSubSensorTestTopic")
TOPIC_FOR_OPERATOR_DAG = os.environ.get("GCP_PUBSUB_OPERATOR_TOPIC", "PubSubOperatorTestTopic")
MESSAGE = {"data": b"Tool", "attributes": {"name": "wrench", "mass": "1.3kg", "count": "3"}}

# [START howto_operator_gcp_pubsub_pull_messages_result_cmd]
Expand Down

0 comments on commit 6616617

Please sign in to comment.