Sha256: 3a2f730b9bcfce6630c21a404b434b87e340d2020c5c1e3c9fd8e52d1c3be554

Contents?: true

Size: 413 Bytes

Versions: 3

Compression:

Stored size: 413 Bytes

Contents

# frozen_string_literal: true

module SidekiqUniqueJobs
  class Lock
    class UntilAndWhileExecuting < BaseLock
      def execute
        return unless locked?
        unlock

        runtime_lock.execute do
          yield if block_given?
        end
      end

      def runtime_lock
        @runtime_lock ||= SidekiqUniqueJobs::Lock::WhileExecuting.new(item, callback, redis_pool)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sidekiq-unique-jobs-6.0.0.rc6 lib/sidekiq_unique_jobs/lock/until_and_while_executing.rb
sidekiq-unique-jobs-6.0.0.rc5 lib/sidekiq_unique_jobs/lock/until_and_while_executing.rb
sidekiq-unique-jobs-6.0.0.rc4 lib/sidekiq_unique_jobs/lock/until_and_while_executing.rb