开发者

How to fetch a specific job from the queue using Delayed::Job

开发者 https://www.devze.com 2023-02-01 06:11 出处:网络
I\'m working with Delayed::Job recently, and I want to find out if there开发者_如何学C\'s a specific job is enqueued or not, any idea on that?The jobs are all written to a table named delayed_jobs, an

I'm working with Delayed::Job recently, and I want to find out if there开发者_如何学C's a specific job is enqueued or not, any idea on that?


The jobs are all written to a table named delayed_jobs, and Delayed::Job is an ActiveRecord class that you can use to query the table. You might want to query the handler column.

I'd recommend against this, however. There's probably a more elegant way to solve the problem.

0

精彩评论

暂无评论...
验证码 换一张
取 消