Python 芹菜自动缩放不执行任务

Python 芹菜自动缩放不执行任务,python,rabbitmq,celery,Python,Rabbitmq,Celery,芹菜收到任务时,此任务永远不会执行,只是挂起: 这些任务以非常低的负载随机到达 芹菜3.1.20 [2016-03-02 22:33:08,300: INFO/MainProcess] Received task: catalogue.cluster.deploy_cluster.imbue_cluster[A5C030C4E0] [2016-03-02 22:33:08,303: INFO/MainProcess] Scaling up 1 processes. 在这之后,什么也没有发生 我

芹菜收到任务时,此任务永远不会执行,只是挂起: 这些任务以非常低的负载随机到达

芹菜3.1.20

[2016-03-02 22:33:08,300: INFO/MainProcess] Received task: catalogue.cluster.deploy_cluster.imbue_cluster[A5C030C4E0]
[2016-03-02 22:33:08,303: INFO/MainProcess] Scaling up 1 processes.
在这之后,什么也没有发生

我使用shell脚本从supervisord开始制作芹菜:

source ~/.profile
CELERY_LOGFILE=/usr/local/src/imbue/application/imbue/log/celeryd.log
CELERYD_OPTS=" --loglevel=INFO --autoscale=10,5"
cd /usr/local/src/imbue/application/imbue/conf
exec celery worker -n celeryd@%h -f $CELERY_LOGFILE $CELERYD_OPTS
我的配置:

CELERYD_CHDIR=settings.filepath
CELERY_IGNORE_RESULT = False
CELERY_RESULT_BACKEND = "amqp"
CELERY_TASK_RESULT_EXPIRES = 360000
CELERY_RESULT_PERSISTENT = True
BROKER_URL=<rabbitmq>
CELERY_ENABLE_UTC=True
CELERY_TIMEZONE= "US/Eastern"
CELERY_IMPORTS=("catalogue.cluster.deploy_cluster",
                "tools.deploy_tools",)
类似问题:


您如何知道任务没有执行?什么没有发生?您可以在任务中添加一些日志语句来显示代码是否正在运行。您不创建结果对象-为什么不?任务仍处于已接收状态。我通过Flower和我的应用程序监控任务
celery = Celery()
celery.config_from_object('conf.celeryconfig')
celery.send_task("catalogue.cluster.deploy_cluster.imbue_cluster",
                             kwargs={'configuration': configuration,
                                     'job':           job_instance,
                                     'api_call':      True},
                             task_id=job_instance.reference)


@task(bind=True, default_retry_delay=300, max_retries=5)
def imbue_cluster(...)