Skip to content

Instantly share code, notes, and snippets.

@rohit-saharan
Created June 4, 2020 13:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rohit-saharan/18f5fb74b31a3a173f7736a6be213fe9 to your computer and use it in GitHub Desktop.
Save rohit-saharan/18f5fb74b31a3a173f7736a6be213fe9 to your computer and use it in GitHub Desktop.
import os
#env vars used:
#AWS_REGION: specify which region you want to access SQS from.
#SQS_URL: The url of the sqs queue to listen for. The AWS keys are picked up
# from the environment vars that we'll add later while running the worker.
CELERY_BROKER_TRANSPORT_OPTIONS = {
'region': os.getenv('AWS_REGION','us-east-1'),
'predefined_queues': {
'default': {
'url': os.getenv('SQS_URL')
}
}
}
broker_url="sqs://"
result_backend = 'rpc://'
enable_utc = True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment