Self re-enqueueing unique-at-runtime job at end of execution
Closed this issue · 1 comments
pedroaugusto commented
Hi, I'm trying to re-enqueue a unique-at-runtime job at the end of its execution. Is there a way to do it from inside the job's perform method?
My job is set with the following setup:
include Resque::Plugins::UniqueByArity.new(
arity_for_uniqueness: 1,
unique_at_runtime: true,
unique_in_queue: true
)
And I would like to do this in my job:
class MyJob
#...
def perform(id)
# execute tasks and check if
Resque.enqueue(self, id)
end
pboling commented
Yeah, that should work. But I presume you might be asking because it isn't working? What are you seeing?