Sha256: b2bb04b736b195244525986ecc638b3ad96611a8e9782a60974f620169599887

Contents?: true

Size: 514 Bytes

Versions: 16

Compression:

Stored size: 514 Bytes

Contents

# frozen_string_literal: true

# :nocov:

# This class will lock until the job is successfully executed
#
# It will wait for 0 seconds to acquire a lock and it will expire the unique key after 2 seconds
#
class UntilExecuted2Job
  include Sidekiq::Worker
  sidekiq_options backtrace: 10,
                  lock: :until_executed,
                  lock_timeout: 0,
                  queue: :working,
                  retry: 1

  def perform(one, two)
    [one, two]
  end

  def after_unlock
    # NO OP
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
sidekiq-unique-jobs-6.0.13 examples/until_executed_2_job.rb
sidekiq-unique-jobs-6.0.12 examples/until_executed_2_job.rb
sidekiq-unique-jobs-6.0.11 examples/until_executed_2_job.rb
sidekiq-unique-jobs-6.0.10 examples/until_executed_2_job.rb
sidekiq-unique-jobs-6.0.9 examples/until_executed_2_job.rb
sidekiq-unique-jobs-6.0.8 examples/until_executed_2_job.rb
sidekiq-unique-jobs-6.0.7 examples/until_executed_2_job.rb
sidekiq-unique-jobs-6.0.6 examples/until_executed_2_job.rb
sidekiq-unique-jobs-6.0.5 examples/until_executed_2_job.rb
sidekiq-unique-jobs-6.0.4 examples/until_executed_2_job.rb
sidekiq-unique-jobs-6.0.3 examples/until_executed_2_job.rb
sidekiq-unique-jobs-6.0.2 examples/until_executed_2_job.rb
sidekiq-unique-jobs-6.0.1 examples/until_executed_2_job.rb
sidekiq-unique-jobs-6.0.0 examples/until_executed_2_job.rb
sidekiq-unique-jobs-6.0.0.rc8 examples/until_executed_2_job.rb
sidekiq-unique-jobs-6.0.0.rc7 examples/until_executed_2_job.rb