antirez / antirez/disque

[Request] Iterate/Peek delayed jobs

未关闭
#180 2 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
C
星标
8.1k
派生
532
PR 合并指标
30 天内没有已合并 PR

描述

Currently there's no way to find jobs that have been queued with a delay using `JSCAN` or `QPEEK`.
Similarly `QSTAT` on a queue containing only delayed jobs runs null, but I think this is intentional?

My use case is that I want to sometimes execute jobs earlier than their set delays.
As a work around I'm maintaining a list of delayed job ids in my application code for when I need to process jobs immediately and using `SHOW` to retrieve the job then `ACKJOB` as normal to mark it processed.

It would be good if `QPEEK` and `JSCAN` had an option to include or show only delayed jobs in their response so it would be possible to iterate and dequeue them if they're no longer necessary or process them immediately.

A possible implementation may be adding a new job state `delayed`, which would allow `JSCAN` to query for it.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。