花成功显示任务,即使成功

时间:2019-01-22 07:28:31

标签: python python-3.x celery celery-task flower

我的芹菜任务如下

@celery_app_site24x7.task(queue='site24x7')
    def createWebsiteMonitoring(**kwargs):
        """ Celery Task to create or update website Moniroting """

        time.sleep(100)
        site24x7Instance = Business_api.thirdpartyFactory.instantiate(
            "site24x7")
        # site24x7Instance.login()
        return site24x7Instance.createWebsiteMonitoring(**kwargs)

在我的芹菜工人日志中,我发现成功成功了:

  

[2019-01-18 15:14:42,633:INFO / ForkPoolWorker-2]任务   celery_tasks.site24x7.createWebsiteMonitoring [c2a5ad46-fde0-4c2c-ac46-3d2f7c9f5861]   在109.22832555975765s中成功:“ 279832000003624811”

但是在Flower中,我看到其仍处于“已接收”状态:

enter image description here

我添加了time.sleep(100)

后遇到了这个问题

是否需要添加任何配置?还是我做错了?

我正在开花如下:

flower -A monitoringExterne --app=monitoringExterne.celerys.$APP --port=8080 --broker=$CONNECTOR/$DATABASE --debug > /dev/stdout

更新

createWebsiteMonitoring()方法将requests POST发送到URL。

0 个答案:

没有答案