Check if the job is expecting a resque with specific arguments in the queue

For example, I set the task this way

Resque.enqueue(MyJob, user.id)

Before the queue of the next job with the same user.id, I would like to check if there is a job in the queue with this user ID.

I hope there is a syntax like:

Resque.queue('MyQueue').has_pending_job(MyJob, user.id)
+4
source share
1 answer

I don’t think there is such a thing, you can achieve the same with a few options

+3

Source: https://habr.com/ru/post/1606300/


All Articles