I am using Sidekiq with Rails 3 with the following working class:
class BotWorker
include Sidekiq::Worker
def perform(user_id)
user = User.find(user_id)
puts user.email
if condition
BotWorker.perform_in(1.hour, user_id)
end
end
end
My controller just has
BotWorker.perform_async(user_id)
However, on the Sidekiq dashboard, it doesn't look like another worker is planned.
I would also like to note that the repetition is conditional, so it does not look like I can use the sidetiq or somekikiq extension.
Still new to Sidekiq, read the documentation. What am I missing?
source
share