Sha256: c1ed751d98af9d517c27cd43085b2a326302d4916c2824151f9797952b122c50

Contents?: true

Size: 472 Bytes

Versions: 2

Compression:

Stored size: 472 Bytes

Contents

class UniqueJobWithFilterMethod
  include Sidekiq::Worker
  sidekiq_options queue: :customqueue, retry: 1, backtrace: 10,
                  unique: :while_executing, unique_args: :filtered_args

  sidekiq_retries_exhausted do |msg|
    logger.warn "Failed #{msg['class']} with #{msg['args']}: #{msg['error_message']}"
  end

  def perform(*)
    # NO-OP
  end

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sidekiq-unique-jobs-5.0.2 spec/jobs/unique_job_with_filter_method.rb
sidekiq-unique-jobs-5.0.1 spec/jobs/unique_job_with_filter_method.rb