Reputation: 71
I am unable to configure Celery to use SQS. I followed the instructions on this link: http://docs.celeryproject.org/en/latest/getting-started/brokers/sqs.html
Here is the stack trace.
[2018-02-21 12:27:25,073: CRITICAL/MainProcess] Unrecoverable error: ModuleNotFoundError("No module named 'sqs'",) 12:27:25 worker.1 | Traceback (most recent call last): 12:27:25 worker.1 | File "/Users/logan/.virtualenvs/dolittle/lib/python3.6/site-packages/kombu/utils/objects.py", line 42, in get 12:27:25 worker.1 | return obj.dict[self.name] 12:27:25 worker.1 | KeyError: 'backend'
I'm using Python 3.6.
Dependencies:
boto==2.46.1
celery==4.0.2
Am I missing something?
Upvotes: 3
Views: 1647
Reputation: 31
To answer the question from @Anton in the comments on @Sander van Leeuwen's post;
From what I understand, SQS is not a system to be holding and receiving results on. You should look into using an Elasticache solution. Hence, Results backend should be set to None
instead of an SQS address (unless you have some sort of Elasticache like solution to save results to).
Upvotes: 0
Reputation: 39859
You need to install celery[sqs]
as per the new documentation:
https://docs.celeryproject.org/en/stable/getting-started/backends-and-brokers/sqs.html
When installing via PIP, if you have the following issue:
FileNotFoundError: [Errno 2] No such file or directory: 'curl-config'
Install the libcurl devel packages:
Debian based :
sudo apt install libcurl4-openssl-dev libssl-dev
Centos/Fedora :
dnf install libcurl-devel
Upvotes: 0
Reputation: 3033
It's using SQS as a result backend as well. You can set CELERY_RESULT_BACKEND = None
, for example.
Upvotes: 3