Celerybeat与Mongo连接错误

时间:2012-09-10 10:01:19

标签: python mongodb celery celeryd celerybeat

我正在尝试使用celerybeat设置芹菜任务队列,以便定期更新数据库。我的celeryd服务似乎工作得很好,但celerybeat一直给我一个Connection error: [Errno 111]

[2012-09-10 09:40:18,954: INFO/MainProcess] Celerybeat: Starting...
[2012-09-10 09:40:19,001: ERROR/MainProcess] Celerybeat: Connection error: [Errno 111] Connection refused. Trying again in 2.0 seconds...
[2012-09-10 09:40:22,004: ERROR/MainProcess] Celerybeat: Connection error: [Errno 111] Connection refused. Trying again in 4.0 seconds...
[2012-09-10 09:40:32,012: ERROR/MainProcess] Celerybeat: Connection error: [Errno 111] Connection refused. Trying again in 6.0 seconds...
[2012-09-10 09:40:53,030: ERROR/MainProcess] Celerybeat: Connection error: [Errno 111] Connection refused. Trying again in 8.0 seconds...
[2012-09-10 09:41:29,052: ERROR/MainProcess] Celerybeat: Connection error: [Errno 111] Connection refused. Trying again in 10.0 seconds...

这是我的celeryconfig文件:

from celery.schedules import crontab
import datetime

BROKER_URL = 'mongodb://localhost:27017/tasks'
CELERY_RESULT_BACKEND = 'mongodb'
CELERY_MONGODB_BACKEND_SETTINGS = {
    "host": "127.0.0.1",
    "port": 27017,
    "database": "celery",
    "taskmeta_collection": "celery_taskmeta",
}

CELERYBEAT_SCHEDULE = {
    'update-linked-calendars': {
        'task': 'tasks.initiateUpdate',
        'schedule': crontab(minute=0, hour='*/1')
    },
}

CELERY_IMPORTS = ('tasks',)

我已经在这方面工作了很长时间,但我仍然对为什么会收到此错误感到困惑。我的MongoDB没有用户名/密码(完全用于我的应用程序)。任何帮助将不胜感激!

0 个答案:

没有答案