简体   繁体   中英

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM