Result backend doesn’t work or tasks are always in PENDING state¶
All tasks are PENDING by default, so the state would’ve been better named “unknown”. Celery doesn’t update the state when a task is sent, and any task with no history is assumed to be pending (you know the task id, after all).

1. Make sure that the task doesn’t have ignore_result enabled.

Enabling this option will force the worker to skip updating states.

2. Make sure the task_ignore_result setting isn’t enabled.

3. Make sure that you don’t have any old workers still running.

It’s easy to start multiple workers by accident, so make sure that the previous worker is properly shut down before you start a new one.

An old worker that isn’t configured with the expected result backend may be running and is hijacking the tasks.

The --pidfile argument can be set to an absolute path to make sure this doesn’t happen.

4. Make sure the client is configured with the right backend.

If, for some reason, the client is configured to use a different backend than the worker, you won’t be able to receive the result. Make sure the backend is configured correctly:

>>> result = task.delay()
>>> print(result.backend)

from: http://docs.celeryproject.org/en/latest/getting-started/first-steps-with-celery.html#result-backend-doesn-t-work-or-tasks-are-always-in-pending-state

celery tasks always in pending的更多相关文章

  1. Celery学习笔记

    转载请注明出处:点我 我的第一篇博客!嘿嘿! 在公司实习,接触到的第一个项目就用到了Celery,之前是完全没有接触过Celery这玩意,然后花了点时间仔细的研究了下怎么用.在学习过程中也遇到了些问题 ...

  2. 在tornado中使用celery实现异步任务处理之中的一个

    一.简单介绍 tornado-celery是用于Tornado web框架的非堵塞 celeryclient. 通过tornado-celery能够将耗时任务增加到任务队列中处理, 在celery中创 ...

  3. celery异步消息处理框架

    Celery 1.什么是Clelery Celery是一个简单.灵活且可靠的,处理大量消息的分布式系统 专注于实时处理的异步任务队列 同时也支持任务调度 Celery架构 Celery的架构由三部分组 ...

  4. celery 和 haystack

    celery  是分布式异步框架 haystack  是全文检索  只能在Django中用. 一.什么是celery?     ---->它是Python写的,所以只支持Python使用.但是消 ...

  5. 分布式队列神器 Celery

    Celery 是什么? Celery 是一个由 Python 编写的简单.灵活.可靠的用来处理大量信息的分布式系统,它同时提供操作和维护分布式系统所需的工具. Celery 专注于实时任务处理,支持任 ...

  6. python celery任务分发

    <div id="cnblogs_post_body" class="blogpost-body"><p>Celery是由Python开 ...

  7. celery 大量消息的分布式系统 定时任务

    Celery 1.什么是Celery Celery是一个简单.灵活且可靠的,处理大量消息的分布式系统 专注于实时处理的异步任务队列 同时也支持任务调度 Celery架构 https://www.jia ...

  8. Celery完成定时任务

    1.什么是Celery Celery是一个简单.灵活且可靠的,处理大量消息的分布式系统 专注于实时处理的异步任务队列 同时也支持任务调度 celery支持linux,如果windows使用celery ...

  9. celery分布式异步框架

    1.什么是Celery Celery是一个简单.灵活且可靠的,处理大量消息的分布式系统 专注于实时处理的异步任务队列 同时也支持任务调度 Celery架构 Celery的架构由三部分组成,消息中间件( ...

随机推荐

  1. CF1392G-Omkar and Pies【dp】

    正题 题目链接:https://www.luogu.com.cn/problem/CF1392G 题目大意 两个长度为\(k\)的起始和目标01串. \(n\)个操作交换起始串的两个位置,选择一段长度 ...

  2. P5325-[模板]Min_25筛

    正题 题目链接:https://www.luogu.com.cn/problem/P5325 题目大意 定义一个积性函数满足\(f(p^k)=p^k(p^k-1)\) 求\(\sum_{i=1}^nf ...

  3. pymysql链接时,密码含有特殊符号。

    类如含有@之类的特殊符号,在链接数据库时,需要提前url转码,不然会报密码错误. python3/2分别引用是同样的第三方库,但是引用方式不同 python2 from urllib import q ...

  4. Windows10系统下Java JDK下载、安装与环境变量配置(全网最全步骤)

    1.首先要明确: JDK.JRE.JVM的含义 2.下载目前最新的JDK:Java SE Development Kit 17,传送门::https://www.oracle.com/java/tec ...

  5. C++核心编程 4 类和对象-对象的初始化和清理

    构造函数和析构函数 对象的初始化和清理工作是两个非常重要的安全问题,一个对象或者变量没有初始状态,对其使用结果是未知的,同样,使用完一个对象或变量,没有及时清理,也会造成一定的安全问题.C++利用了构 ...

  6. 高德 Serverless 平台建设及实践

    作者 | 邓学祥(祥翼) 来源 | Serverless 公众号 高德从 FY21 财年开始启动 Serverless 建设,至今一年了,高德 Serverless 业务的峰值超过十万 qps 量级, ...

  7. 每日总结:charcter方法(2021.10.5)

    \t 在文中该处插入一个tab键 \b在文中该处插入一个后退键 \n 换行 \r  在文中该处回车 \f 在文中该处插入换页符 方法: isLetter()是否是一个字母 isDigit()是否是一个 ...

  8. CF1082E Increasing Frequency (multiset+乱搞+贪心)

    题目大意: \(给你n个数a_i,给定一个m,你可以选择一个区间[l,r],让他们区间加一个任意数,然后询问一次操作完之后,最多能得到多少个m\) QWQ 考场上真的** 想了好久都不会,直到考试快结 ...

  9. bzoj4821 && luogu3707 SDOI2017相关分析(线段树,数学)

    题目大意 给定n个元素的数列,每一个元素有x和y两种元素,现在有三种操作: \(1\ L\ R\) 设\(xx\)为\([l,r]\)的元素的\(x_i\)的平均值,\(yy\)同理 求 \(\fra ...

  10. 【原创】C语言和C++常见误区(一)

    本文仅在博客园发布,认准原文地址:https://www.cnblogs.com/jisuanjizhishizatan/p/15414469.html 问题1:int类型占几个字节? 常见误区:占4 ...