Sha256: ba3d14e77f59ab983502375e323810e88ad29310f867fbc996a4fbdafa18072c

Contents?: true

Size: 721 Bytes

Versions: 18

Compression:

Stored size: 721 Bytes

Contents

# frozen_string_literal: true

module SidekiqUniqueJobs
  module Middleware
    # The unique sidekiq middleware for the server processor
    #
    # @author Mikael Henriksson <mikael@mhenrixon.com>
    class Server
      prepend SidekiqUniqueJobs::Middleware

      #
      #
      # Runs the server middleware (used from Sidekiq::Processor#process)
      #
      # @see SidekiqUniqueJobs::Middleware#call
      #
      # @see https://github.com/mperham/sidekiq/wiki/Job-Format
      # @see https://github.com/mperham/sidekiq/wiki/Middleware
      #
      # @yield when uniqueness is disabled
      # @yield when owning the lock
      def call(*, &block)
        lock_instance.execute(&block)
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
sidekiq-unique-jobs-7.0.13 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.0.12 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.0.11 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.0.10 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.0.9 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.0.8 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.0.7 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.0.6 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.0.5 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.0.4 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.0.3 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.0.2 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.0.1 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.0.0 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.0.0.beta29 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.0.0.beta28 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.0.0.beta27 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.0.0.beta26 lib/sidekiq_unique_jobs/middleware/server.rb