Sha256: 3704ccbd7cdcdf156ea86d8195824e7706f135cee586910788ad7bc49afca29b

Contents?: true

Size: 444 Bytes

Versions: 6

Compression:

Stored size: 444 Bytes

Contents

# frozen_string_literal: true

# :nocov:

class MyUniqueJobWithFilterMethod
  include Sidekiq::Worker
  sidekiq_options queue: :customqueue,
                  retry: true,
                  backtrace: true,
                  unique: :until_executed,
                  unique_args: :filtered_args

  def perform(*)
    # NO-OP
  end

  def self.filtered_args(args)
    options = args.extract_options!
    [args.first, options['type']]
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
sidekiq-unique-jobs-6.0.0.rc6 examples/my_unique_job_with_filter_method.rb
sidekiq-unique-jobs-6.0.0.rc5 examples/my_unique_job_with_filter_method.rb
sidekiq-unique-jobs-6.0.0.rc4 examples/my_unique_job_with_filter_method.rb
sidekiq-unique-jobs-6.0.0.rc3 examples/my_unique_job_with_filter_method.rb
sidekiq-unique-jobs-6.0.0.rc2 examples/my_unique_job_with_filter_method.rb
sidekiq-unique-jobs-6.0.0.rc1 examples/my_unique_job_with_filter_method.rb