python连接redis失败、积极拒绝_错误111连接被拒绝(Python、celery、redis)

我尝试获取redis中所有活动/计划/保留的任务:from celery.task.control import inspect

inspect_obj = inspect()

inspect_obj.active()

inspect_obj.scheduled()

inspect_obj.reserved()

但收到的错误清单如下:

我的虚拟环境==>HubblerAPI。

Iam从ec2控制台使用此功能

^{pr2}$

我的芹菜配置文件如下:BROKER_TRANSPORT = 'redis'

BROKER_TRANSPORT_OPTIONS = {

'queue_name_prefix': 'dev-',

'wait_time_seconds': 10,

'polling_interval': 30,

# The polling interval decides the number of seconds to sleep

between unsuccessful polls

'visibility_timeout': 3600 * 5,

# If a task is not acknowledged within the visibility_timeout, the

task will be redelivered to another worker and executed.

}

CELERY_MESSAGES_DB = 6

BROKER_URL = "redis://%s:%s/%s" % (AWS_REDIS_ENDPOINT, AWS_REDIS_PORT,

CELERY_MESSAGES_DB)

我做错了什么,因为错误日志显示它没有使用redis代理。在

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值