芹菜与Amazon SQS [英] Celery with Amazon SQS

查看:260
本文介绍了芹菜与Amazon SQS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用亚马逊SQS 作为经纪人的支持的芹菜。还有的SQS运输实现海带,其中芹菜依赖。但是没有足够的文档,使用它,所以我找不到如何在芹菜配置SQS。有没有人认为已经成功为上芹菜配置SQS?

I want to use Amazon SQS as broker backed of Celery. There’s the SQS transport implementation for Kombu, which Celery depends on. However there is not enough documentation for using it, so I cannot find how to configure SQS on Celery. Is there somebody that had succeeded to configure SQS on Celery?

推荐答案

我就遇到了这个问题,好几次,但仍然没有完全确定设置如何西芹SQS工作。事实证明,它与海带和芹菜的最新版本很容易。作为一种替代方法在另一个答复中提到的BROKER_URL语法,你可以简单地集运输,选项,用户和密码,像这样:

I ran into this question several times but still wasn't entirely sure how to setup Celery to work with SQS. It turns out that it is quite easy with the latest versions of Kombu and Celery. As an alternative to the BROKER_URL syntax mentioned in another answer, you can simply set the transport, options, user, and password like so:

BROKER_TRANSPORT = 'sqs'
BROKER_TRANSPORT_OPTIONS = {
    'region': 'us-east-1',
}
BROKER_USER = AWS_ACCESS_KEY_ID
BROKER_PASSWORD = AWS_SECRET_ACCESS_KEY

这得到周​​围的URL解析器不允许正斜杠在您的API的秘密,这似乎是一个相当普遍的现象与AWS一个所谓的问题。因为似乎没有成为一个丰富的在那里的话题的信息呢,我也写了这里的话题很短的博客文章:

This gets around a purported issue with the URL parser that doesn't allow forward slashes in your API secret, which seems to be a fairly common occurrence with AWS. Since there didn't seem to be a wealth of information out there about the topic yet, I also wrote a short blog post on the topic here:

<一个href="http://www.caktusgroup.com/blog/2011/12/19/using-django-and-celery-amazon-sqs/">http://www.caktusgroup.com/blog/2011/12/19/using-django-and-celery-amazon-sqs/

这篇关于芹菜与Amazon SQS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆