leomayleomay
leomayleomay

Reputation: 563

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

I'm working with Delayed::Job recently, and I want to find out if there's a specific job is enqueued or not, any idea on that?

Upvotes: 0

Views: 214

Answers (1)

Jeremy Weiskotten
Jeremy Weiskotten

Reputation: 978

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.

Upvotes: 1

Related Questions