dylanbstorey commented on issue #50202:
URL: https://github.com/apache/airflow/issues/50202#issuecomment-2855336139

   Can i see the full stack trace ? 
   
   Based on what you’re describing though sounds like the DAG can’t be found 
for import,  instead of using dot notation, just use the raw function call. 
   
   ```python
   def listen_function(message):
       val = json.loads(message.value().decode("utf-8”))
       # Process the message here if needed
       return val
   
   with DAG(
       dag_id="kafka_sensor_jira_dag",
       start_date=datetime(2025, 3, 17),
       schedule_interval=None,  # This DAG runs continuously
       catchup=False,
   ):
   
       def trigger_downstream_dag(message, **context):
           TriggerDagRunOperator(
               trigger_dag_id="kafka_consumer_jira_dag",
               task_id=f"kafka_sensor_jira{_generate_uuid()}",
           ).execute(context)
       
       await_message_sensor = AwaitMessageTriggerFunctionSensor(
           task_id="kafka_sensor_jira",
           topics=[TOPIC_NAME],
           apply_function=listen_function,
           kafka_config_id="kafka_default_jira",
           event_triggered_function=trigger_downstream_dag,
       )
   ```
   


-- 
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