Sha256: 60a4a17496ef184e67ecde605dbf6e7d7f9d7eb89ed905cad56e3baab07334fc

Contents?: true

Size: 501 Bytes

Versions: 39

Compression:

Stored size: 501 Bytes

Contents

# frozen_string_literal: true

module SidekiqUniqueJobs
  class Lock
    # Locks jobs until {#execute} starts
    # - Locks on perform_in or perform_async
    # - Unlocks before yielding to the worker's perform method
    #
    # @author Mikael Henriksson <mikael@zoolutions.se>
    class UntilExecuting < BaseLock
      # Executes in the Sidekiq server process
      # @yield to the worker class perform method
      def execute
        unlock_with_callback
        yield
      end
    end
  end
end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
sidekiq-unique-jobs-6.0.25 lib/sidekiq_unique_jobs/lock/until_executing.rb
sidekiq-unique-jobs-7.0.0.beta25 lib/sidekiq_unique_jobs/lock/until_executing.rb
sidekiq-unique-jobs-6.0.24 lib/sidekiq_unique_jobs/lock/until_executing.rb
sidekiq-unique-jobs-7.0.0.beta24 lib/sidekiq_unique_jobs/lock/until_executing.rb
sidekiq-unique-jobs-6.0.23 lib/sidekiq_unique_jobs/lock/until_executing.rb
sidekiq-unique-jobs-7.0.0.beta23 lib/sidekiq_unique_jobs/lock/until_executing.rb
sidekiq-unique-jobs-7.0.0.beta22 lib/sidekiq_unique_jobs/lock/until_executing.rb
sidekiq-unique-jobs-7.0.0.beta21 lib/sidekiq_unique_jobs/lock/until_executing.rb
sidekiq-unique-jobs-7.0.0.beta20 lib/sidekiq_unique_jobs/lock/until_executing.rb
sidekiq-unique-jobs-7.0.0.beta19 lib/sidekiq_unique_jobs/lock/until_executing.rb
sidekiq-unique-jobs-7.0.0.beta18 lib/sidekiq_unique_jobs/lock/until_executing.rb
sidekiq-unique-jobs-7.0.0.beta17 lib/sidekiq_unique_jobs/lock/until_executing.rb
sidekiq-unique-jobs-6.0.22 lib/sidekiq_unique_jobs/lock/until_executing.rb
sidekiq-unique-jobs-7.0.0.beta16 lib/sidekiq_unique_jobs/lock/until_executing.rb
sidekiq-unique-jobs-7.0.0.beta15 lib/sidekiq_unique_jobs/lock/until_executing.rb
sidekiq-unique-jobs-7.0.0.beta14 lib/sidekiq_unique_jobs/lock/until_executing.rb
sidekiq-unique-jobs-6.0.21 lib/sidekiq_unique_jobs/lock/until_executing.rb
sidekiq-unique-jobs-7.0.0.beta13 lib/sidekiq_unique_jobs/lock/until_executing.rb
sidekiq-unique-jobs-7.0.0.beta12 lib/sidekiq_unique_jobs/lock/until_executing.rb
sidekiq-unique-jobs-6.0.20 lib/sidekiq_unique_jobs/lock/until_executing.rb