Sidekiq : Not supporting Keyword Arguments

class Cancellation::ProcessorAsync
  include Sidekiq::Worker
  sidekiq_options :queue => :cancellations, :retry => 3

  def perform(requests_ids: [])
    ...
  end
end

 

and from controller

Cancellation::ProcessorAsync.perform_async(requests_ids: cancellation_requests.map(&:id))

Problem:

 ArgumentError: wrong number of arguments (1 for 0)

{“class”=>”Cancellation::ProcessorAsync”, “args”=>[{“requests_ids”=>[42]}], “retry”=>3, “queue”=>”cancellations”, “jid”=>”c7fe305852080e26ae4374be”, “created_at”=>1462768111.751091, “enqueued_at”=>1462768257.4815748, “error_message”=>”wrong number of arguments (1 for 0)”, “error_class”=>”ArgumentError”, “failed_at”=>1462768111.7538342, “retry_count”=>2, “retried_at”=>1462768257.4844065}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s