2👍
If you are using Celery 4.0.0 and have this line
app.config_from_object('django.conf:settings', namespace='CELERY')
Namespace tells that all Celery related settings should start with CELERY
Use then CELERY_BROKER_URL, CELERY_BROKER_TRANSPORT_OPTIONS.
0👍
I’ve just managed to link up Celery and SQS.
In my settings:
BROKER_URL = 'sqs://'
BROKER_TRANSPORT_OPTIONS = {'region': 'eu-west-1',
'visibility_timeout': 43200,# in seconds
'polling_interval': 3,
'queue_name_prefix':'repricer-stage-',
'CELERY_SEND_TASK_ERROR_EMAILS': True
}
Above, note BROKER_RUL = ‘sqs://’:
The login credentials can also be set using the environment variables
AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY, in that case the broker
url may only be sqs://.
Be aware that you need a worker active to interact with SQS. Via the console (in your virtual environment):
$ celery -A proj worker -l info
- [Answered ]-Is there a way to include multiple javascript files in a django template?
- [Answered ]-Updating account balance with django
- [Answered ]-Sys.path.append, how to resolve name collisions when you cannot modify modules
- [Answered ]-Django can't download file via admin
Source:stackexchange.com