Celery + SQS is receiving same task twice, with same task id at same time Celery + SQS is receiving same task twice, with same task id at same time flask flask

Celery + SQS is receiving same task twice, with same task id at same time


The default SQS visiblity_timeout is 30s. You need to update the celery config value:broker_transport_options={'visibility_timeout': 3600}.

When celery goes to create the queue it will set the visibility timeout to 1h.

NOTE: If you specify the task_default_queue, and the queue has already been created without specifying broker_transport_options={'visibility_timeout': 3600}, celery will not update the visibility timeout when restarted with broker_transport_options={'visibility_timeout': 3600}. You will need to delete the queue and have celery recreate it.