Reputation: 2047
I have a Sidekiq worker called class Consolidation::AnalyticsWorker < BaseWorker
I want to perform it manually for testing How can I achieve this?
Tried in rails console:
test = Consolidation::AnalyticsWorker
perform(test)
Upvotes: 2
Views: 6088
Reputation: 252
You have to do something like Consolidation::AnalyticsWorker.new.perform(args)
where args are arguments which method Consolidation::AnalyticsWorker#perform
takes.
Upvotes: 9