Sha256: 3f69cd819b924372fecfbea59d62d43f7d381ab3cfbbff5ebc535476d3806465

Contents?: true

Size: 467 Bytes

Versions: 1

Compression:

Stored size: 467 Bytes

Contents

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

  sidekiq_retries_exhausted do |msg|
    Sidekiq.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

1 entries across 1 versions & 1 rubygems

Version Path
sidekiq-unique-jobs-4.0.0 spec/workers/unique_job_with_filter_method.rb