title: How does Sidekiq passes arguments to the perform method?
body: <p>I have this Sidekiq worker:</p>
  
  <pre><code>class DealNoteWorker
    include Sidekiq::Worker
    sidekiq_options queue: :email
  
    def perform(options = {})
      if options[:type] == "deal_watch_mailer"
        deal_watchers = DealWatcher.where("deal_id = ?", options[:deal_id])
  
        deal_note = DealNote.find(options[:deal_note_id])
  
        current_user = User.find(options[:current_user_id])
  
        deal_watchers.each do |deal_watcher|
          unless deal_watcher.user_id == options[:current_user_id]
            # Tell the DealWatchMailer to send emails to ALL watchers advising of change to deal
            if deal_watcher.user.active
              DealWatchMailer.deal_watch_email(deal_watcher, nil, deal_note, current_user, options[:url]).deliver
            end
          end
        end
      elsif options[:type] == "deal_note_mailer"
        options[:user_ids].each do |id|
          if DealWatcher.where("deal_id = ? and user_id =?", options[:deal_id], id).count == 0
            deal_note = Deal.find(options[:deal_note_id])
            user = User.find_by_id(id)
            DealNoteMailer.deal_note_email(deal_note, user, options[:url]).deliver
          end
        end
      end
    end
  end
  </code></pre>
  
  <p>I pass a hash to the <code>perform_async</code> method, but I think that the parameters transfered to the <code>perform</code> method are not of the same type as the ones passed to <code>perform_async</code>. I tried to user <code>logger.info</code> and <code>p</code> to debug my issue but nothing gets outputted...</p>
  
  <p>The issue is that the job is added to the email queue but never gets processed. I even tried to raise an exception in the <code>perform</code> method (on the first line of the method) but nothing was outputted either...</p>
  
  <p>I know as a fact that the following worker works:</p>
  
  <pre><code>class DealNoteWorker
    include Sidekiq::Worker
  
    def perform(deal_id, deal_note_id, current_user_id, url)
      deal_watchers = DealWatcher.where("deal_id = ?", deal_id)
  
      deal_note = DealNote.find(deal_note_id)
  
      current_user = User.find(current_user_id)
  
      deal_watchers.each do |deal_watcher|
        unless deal_watcher.user_id == current_user_id
          # Tell the DealWatchMailer to send emails to ALL watchers advising of change to deal
          if deal_watcher.user.active
            DealWatchMailer.deal_watch_email(deal_watcher, nil, deal_note, current_user, url).deliver
          end
        end
      end
    end
  end
  </code></pre>
  
  <p>So the problem lies in the hash parameter (options). What am I doing wrong please?</p>