Sha256: 57e4c903fb9873ed4dfc2fe14348d25b15f9b470f600a813b9b5ebf465352acd

Contents?: true

Size: 824 Bytes

Versions: 22

Compression:

Stored size: 824 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"
      # @!parse prepends SidekiqUniqueJobs::Middleware
      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

22 entries across 22 versions & 1 rubygems

Version Path
sidekiq-unique-jobs-7.1.23 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.1.22 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.1.21 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.1.20 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.1.19 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.1.18 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.1.17 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.1.16 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.1.15 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.1.14 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.1.13 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.1.12 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.1.11 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.1.10 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.1.8 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.1.7 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.1.6 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.1.5 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.1.3 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.1.2 lib/sidekiq_unique_jobs/middleware/server.rb