You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/08/06 23:59:07 UTC

[GitHub] [airflow] prakash260 opened a new issue #10210: SQSSensor Dag is not triggering whenever there is new message.

prakash260 opened a new issue #10210:
URL: https://github.com/apache/airflow/issues/10210


   I have created a DAG using SQSSensor to trigger whenever there is new message in SQS. 
   
   It is not triggering automatically whenever there is new message. 
   
   Below  is my code:
   ''''
   from __future__ import print_function
   from airflow import DAG
   from airflow.utils.dates import days_ago
   from airflow.operators.python_operator import PythonOperator
   from airflow.contrib.sensors.aws_sqs_sensor import SQSSensor
   default_args = {
       'owner': 'Airflow',
       'start_date': days_ago(1),
       'provide_context': True,
   }
   def pull_from_xcom(**context):
       val = context['ti'].xcom_pull(task_ids='sqs_get', key='messages')
       print(val)
   dag = DAG('sqs_test', default_args=default_args, schedule_interval='@daily')
   t1 = SQSSensor(
       dag=dag,
       task_id='sqs_get',
       sqs_queue='https://sqs.ap-southeast-2.amazonaws.com/accountid/test',
       aws_conn_id='aws_default',
       max_message=1,
       wait_time_seconds = 1
       )
   t2 = PythonOperator(
       task_id='xcom_pull',
       python_callable=pull_from_xcom,
       depends_on_past=False,
       dag=dag)
   t1 >> t2
   ''''
   
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] github-actions[bot] commented on issue #10210: SQSSensor Dag is not triggering whenever there is new message.

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #10210:
URL: https://github.com/apache/airflow/issues/10210#issuecomment-912870540


   This issue has been automatically marked as stale because it has been open for 30 days with no response from the author. It will be closed in next 7 days if no further activity occurs from the issue author.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] github-actions[bot] commented on issue #10210: SQSSensor Dag is not triggering whenever there is new message.

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #10210:
URL: https://github.com/apache/airflow/issues/10210#issuecomment-917297708


   This issue has been closed because it has not received response from the issue author.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] github-actions[bot] closed issue #10210: SQSSensor Dag is not triggering whenever there is new message.

Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed issue #10210:
URL: https://github.com/apache/airflow/issues/10210


   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] krishnareddy97 commented on issue #10210: SQSSensor Dag is not triggering whenever there is new message.

Posted by GitBox <gi...@apache.org>.
krishnareddy97 commented on issue #10210:
URL: https://github.com/apache/airflow/issues/10210#issuecomment-933141131


   > > SQSSensor to trigger whenever there is new message in SQS.
   > 
   > sensors don't trigger anything. They are just blocking the workflow till condition met. I think you are expecting that when a message is in the queue it will trigger a workflow - this is not the use case of Airflow sensors. In any case please recheck with if the issue still exist with Airflow 2 + Amazon provider: https://airflow.apache.org/docs/apache-airflow-providers-amazon/stable/index.html
   > 
   > if the issue still exist please clarify further.
   
   I am facing a similar issue where I can't read the contents of the sqs_queue message JSON strings and upload that to email_operator body... Can you help me with this issue???


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] boring-cyborg[bot] commented on issue #10210: SQSSensor Dag is not triggering whenever there is new message.

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #10210:
URL: https://github.com/apache/airflow/issues/10210#issuecomment-670248194


   Thanks for opening your first issue here! Be sure to follow the issue template!
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] eladkal commented on issue #10210: SQSSensor Dag is not triggering whenever there is new message.

Posted by GitBox <gi...@apache.org>.
eladkal commented on issue #10210:
URL: https://github.com/apache/airflow/issues/10210#issuecomment-881601698


   >SQSSensor to trigger whenever there is new message in SQS.
   
   sensors don't trigger anything. They are just blocking the workflow till condition met.
   I think you are expecting that when a message is in the queue it will trigger a workflow - this is not the use case of Airflow sensors.
   In any case please recheck with if the issue still exist with Airflow 2 + Amazon provider:
   https://airflow.apache.org/docs/apache-airflow-providers-amazon/stable/index.html
   
   if the issue still exist please clarify further.
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org