Sha256: e8311f60d3532391bdc2b84f2932e038693a2131e7b6f03a2d8e6b29aad49571

Contents?: true

Size: 327 Bytes

Versions: 8

Compression:

Stored size: 327 Bytes

Contents

# frozen_string_literal: true

module SidekiqUniqueJobs
  module Lock
    class UntilAndWhileExecuting < UntilExecuting
      def execute(callback)
        lock = WhileExecuting.new(item, redis_pool)
        lock.synchronize do
          callback.call if unlock(:server)
          yield
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
sidekiq-unique-jobs-5.0.11 lib/sidekiq_unique_jobs/lock/until_and_while_executing.rb
sidekiq-unique-jobs-5.0.10 lib/sidekiq_unique_jobs/lock/until_and_while_executing.rb
sidekiq-unique-jobs-5.0.9 lib/sidekiq_unique_jobs/lock/until_and_while_executing.rb
sidekiq-unique-jobs-5.0.8 lib/sidekiq_unique_jobs/lock/until_and_while_executing.rb
sidekiq-unique-jobs-5.0.7 lib/sidekiq_unique_jobs/lock/until_and_while_executing.rb
sidekiq-unique-jobs-5.0.6 lib/sidekiq_unique_jobs/lock/until_and_while_executing.rb
sidekiq-unique-jobs-5.0.5 lib/sidekiq_unique_jobs/lock/until_and_while_executing.rb
sidekiq-unique-jobs-5.0.4 lib/sidekiq_unique_jobs/lock/until_and_while_executing.rb