Here is what I am trying to do:
2.1.2 :001 > UpdateStyleRanks.perform_async
Here is the error:
NoMethodError: undefined method `perform' for #<UpdateStyleRanks:0x00000002f5e388>
Here is my worker:
# app/workers/update_style_ranks.rb
class UpdateStyleRanks
include Sidekiq::Worker
def perform
end
end
There is no naming requirement for workers. You can do this:
class Foo
include Sidekiq::Worker
def perform; end
end
I suspect you just need to restart Rails/Spring/Zeus to pick up the new class.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With