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.16 lib/sidekiq_unique_jobs/lock/until_executing.rb
sidekiq-unique-jobs-7.0.0.beta11 lib/sidekiq_unique_jobs/lock/until_executing.rb
sidekiq-unique-jobs-7.0.0.beta10 lib/sidekiq_unique_jobs/lock/until_executing.rb
sidekiq-unique-jobs-6.0.19 lib/sidekiq_unique_jobs/lock/until_executing.rb
sidekiq-unique-jobs-7.0.0.beta9 lib/sidekiq_unique_jobs/lock/until_executing.rb
sidekiq-unique-jobs-7.0.0.beta8 lib/sidekiq_unique_jobs/lock/until_executing.rb
sidekiq-unique-jobs-7.0.0.beta7 lib/sidekiq_unique_jobs/lock/until_executing.rb
sidekiq-unique-jobs-7.0.0.beta6 lib/sidekiq_unique_jobs/lock/until_executing.rb
sidekiq-unique-jobs-7.0.0.beta5 lib/sidekiq_unique_jobs/lock/until_executing.rb
sidekiq-unique-jobs-7.0.0.beta4 lib/sidekiq_unique_jobs/lock/until_executing.rb
sidekiq-unique-jobs-7.0.0.beta3 lib/sidekiq_unique_jobs/lock/until_executing.rb
sidekiq-unique-jobs-7.0.0.beta2 lib/sidekiq_unique_jobs/lock/until_executing.rb
sidekiq-unique-jobs-6.0.13 lib/sidekiq_unique_jobs/lock/until_executing.rb
sidekiq-unique-jobs-6.0.12 lib/sidekiq_unique_jobs/lock/until_executing.rb
sidekiq-unique-jobs-6.0.11 lib/sidekiq_unique_jobs/lock/until_executing.rb
sidekiq-unique-jobs-6.0.10 lib/sidekiq_unique_jobs/lock/until_executing.rb
sidekiq-unique-jobs-6.0.9 lib/sidekiq_unique_jobs/lock/until_executing.rb
sidekiq-unique-jobs-6.0.8 lib/sidekiq_unique_jobs/lock/until_executing.rb
sidekiq-unique-jobs-6.0.7 lib/sidekiq_unique_jobs/lock/until_executing.rb