Skip to content

when arguments are empty then unique_args proc/method is not executed #201

@salmanasiddiqui

Description

@salmanasiddiqui

consider the following worker:

class CustomWorker
  include Sidekiq::Worker

  sidekiq_options unique: :until_executed
                          unique_args: :custom_args

  def self.custom_args
    puts 'testing'
  end

  def perform(optional=nil)
  end
end

running CustomWorker.perform_async will not run custom_args method and will not print 'testing'
But running CustomWorker.perform_async(nil), CustomWorker.perform_async(2) works as expected.

ruby 2.1.8
gem 'sidekiq', '3.5.4'
gem 'sidekiq-cron', '0.3.1'
gem 'sidekiq-failures', '0.4.5'
gem 'sidekiq-unique-jobs', '4.0.18'
gem 'sidekiq_status', git: 'https://github.com/cryo28/sidekiq_status' (1.2.0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions