惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Engineering at Meta
Engineering at Meta
博客园_首页
H
Help Net Security
WordPress大学
WordPress大学
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
罗磊的独立博客
博客园 - 三生石上(FineUI控件)
B
Blog
I
InfoQ
SecWiki News
SecWiki News
T
Tailwind CSS Blog
Spread Privacy
Spread Privacy
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
V
Vulnerabilities – Threatpost
N
Netflix TechBlog - Medium
P
Palo Alto Networks Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Vercel News
Vercel News
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
K
Kaspersky official blog
M
MIT News - Artificial intelligence
S
Schneier on Security
T
Threat Research - Cisco Blogs
F
Fortinet All Blogs
Cyberwarzone
Cyberwarzone
Scott Helme
Scott Helme
aimingoo的专栏
aimingoo的专栏
Martin Fowler
Martin Fowler
MyScale Blog
MyScale Blog
The Cloudflare Blog
Recent Announcements
Recent Announcements
Security Latest
Security Latest
G
GRAHAM CLULEY
IT之家
IT之家
Y
Y Combinator Blog
The Last Watchdog
The Last Watchdog
腾讯CDC
Google DeepMind News
Google DeepMind News
V
V2EX
S
Securelist
TaoSecurity Blog
TaoSecurity Blog
B
Blog RSS Feed
S
SegmentFault 最新的问题
博客园 - 叶小钗
P
Proofpoint News Feed
云风的 BLOG
云风的 BLOG
Project Zero
Project Zero
G
Google Developers Blog
Google DeepMind News
Google DeepMind News
F
Full Disclosure

RQ

关于长时间运行的 rqworker Python RQ (Redis Queue) 0.4.0 如何? RQ 对提高整个应用的性能很有帮助 如果基于 rq 来开发一个 MapReduce framework? rq-dashboard Rq 执行的的任务貌似对中文支持不佳 关于 RQ 的任务重试机制 这里有人在生产环境使用RQ麽?
RQ中,在一个Queue执行完之后触发事件的方法
0bit · 2013-07-09 · via RQ

先吐槽一句,RQ的官方文档,真的是少得可怜,很多东西都要自己到源码里开才会发现。

我现在要处理很多包,因为要每个包独立处理,所以每个包生成一个Queue,然后我需要的是,在这个Queue处理完成之后,对这个Queue的结果进行统计,貌似RQ中没有这种触发机制,不知道有没有什么好的方法。

我现在用的方法是,不用rqworker,自己在程序里调用Worker,然后设置burst=True,把相关的统计代码,放到worker执行完之后,但是总觉得不是十分的靠谱。

代码大概是这样的:

queueList = sorted([q for q in Queue.all() if q.name != 'failed'])
w = Worker(queueList.pop())
w.work(burst=True)
# 相关的统计函数()