Sha256: 1d3ef2ae818b17d8025e5e0427eca44f4948290ab35c0a1dc601ebe20398cf6f

Contents?: true

Size: 368 Bytes

Versions: 6

Compression:

Stored size: 368 Bytes

Contents

module SidekiqUniqueJobs
  module Lock
    class UntilTimeout < UntilExecuted
      def unlock(scope)
        if scope.to_sym == :server
          return true
        else
          fail ArgumentError, "#{scope} middleware can't #{__method__} #{unique_key}"
        end
      end

      def execute(_callback)
        yield if block_given?
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
sidekiq-unique-jobs-4.0.13 lib/sidekiq_unique_jobs/lock/until_timeout.rb
sidekiq-unique-jobs-4.0.12 lib/sidekiq_unique_jobs/lock/until_timeout.rb
sidekiq-unique-jobs-4.0.11 lib/sidekiq_unique_jobs/lock/until_timeout.rb
sidekiq-unique-jobs-4.0.10 lib/sidekiq_unique_jobs/lock/until_timeout.rb
sidekiq-unique-jobs-4.0.9 lib/sidekiq_unique_jobs/lock/until_timeout.rb
sidekiq-unique-jobs-4.0.7 lib/sidekiq_unique_jobs/lock/until_timeout.rb