Sha256: 8134c91eeb35e4606d1d4810d895c118cb93dc351be75206be27cbc7b8db14a6

Contents?: true

Size: 715 Bytes

Versions: 22

Compression:

Stored size: 715 Bytes

Contents

# frozen_string_literal: true

module SidekiqUniqueJobs
  module Middleware
    # The unique sidekiq middleware for the server processor
    #
    # @author Mikael Henriksson <mikael@zoolutions.se>
    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(*)
        lock_instance.execute { yield }
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
sidekiq-unique-jobs-7.0.0.beta23 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.0.0.beta22 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.0.0.beta21 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.0.0.beta20 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.0.0.beta19 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.0.0.beta18 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.0.0.beta17 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.0.0.beta16 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.0.0.beta15 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.0.0.beta14 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.0.0.beta13 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.0.0.beta12 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.0.0.beta11 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.0.0.beta10 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.0.0.beta9 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.0.0.beta8 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.0.0.beta7 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.0.0.beta6 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.0.0.beta5 lib/sidekiq_unique_jobs/middleware/server.rb
sidekiq-unique-jobs-7.0.0.beta4 lib/sidekiq_unique_jobs/middleware/server.rb