Sha256: f1701e3397674207b9f3e269f6056b642d534530d689a5fd076ec07afd773e1a

Contents?: true

Size: 409 Bytes

Versions: 2

Compression:

Stored size: 409 Bytes

Contents

class SimpleWorker
  include Sidekiq::Worker
  sidekiq_options unique: :until_executed,
                  queue: :default,
                  unique_args: (lambda do |args|
                    [args.first]
                  end)

  def perform(some_args)
    Sidekiq::Logging.with_context(self.class.name) do
      SidekiqUniqueJobs.logger.debug { "#{__method__}(#{some_args})" }
    end
    sleep 1
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sidekiq-unique-jobs-5.0.2 rails_example/app/workers/simple_worker.rb
sidekiq-unique-jobs-5.0.1 rails_example/app/workers/simple_worker.rb