ashb commented on a change in pull request #16866:
URL: https://github.com/apache/airflow/pull/16866#discussion_r666011758



##########
File path: airflow/example_dags/example_trigger_target_dag.py
##########
@@ -24,23 +24,23 @@
 
 from airflow import DAG
 from airflow.operators.bash import BashOperator
-from airflow.operators.python import PythonOperator
+from airflow.operators.python import PythonOperator, get_current_context
 from airflow.utils.dates import days_ago
 
 
-def run_this_func(**context):
+def run_this_func():
     """
     Print the payload "message" passed to the DagRun conf attribute.
 
     :param context: The execution context
     :type context: dict
     """
+    context = get_current_context()
     print(f"Remotely received value of {context['dag_run'].conf['message']} 
for key=message")

Review comment:
       ```suggestion
   def run_this_func(dag_run):
       """
       Print the payload "message" passed to the DagRun conf attribute.
   
       """
       print(f"Remotely received value of {dag_run.conf['message']} for 
key=message")
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to