Cerin
Cerin

Reputation: 64830

Unable to inspect Celery with SQS Backend

I'm using Celery to process asynchronous tasks, and I'm using SQS on Amazon as my messaging server. My tasks have suddenly stopped processing, and when I went to inspect the Celery queue with:

from celery.task.control import inspect
i = inspect()
i.scheduled()

I received the error:

SQSError: SQSError: 400 Bad Request
<?xml version="1.0"?><ErrorResponse xmlns="http://queue.amazonaws.com/doc/2012-11-05/"><Error><Type>Sender</Type><Code>InvalidParameterValue</Code><Message>Can only include alphanumeric characters, hyphens, or underscores. 1 to 80 in length</Message><Detail/></Error><RequestId>adbc0bc9-d1e2-5ab7-bd59-5a7a20cb876c</RequestId></ErrorResponse>

What's causing this? Clearly, this means that I'm passing it a parameter that's invalid, but since Celery is the one generating the SQS request, I'm unsure what that is. How do I fix this?

Upvotes: 2

Views: 936

Answers (1)

jeremycg
jeremycg

Reputation: 24945

According to this github issue:

Basically you can't inspect the state of any woker in the cluster.

Due to the fact that (from the docs):

SQS doesn’t yet support worker remote control commands.

So for now this seems to not be possible - your best bet (and how I solved my problem that lead me here) is probably directly accessing the queue using boto3.

Upvotes: 1

Related Questions