Sha256: dff28529c60e9612593480175ea2c66b2e97d14123488e8096aac1725c5ad5f2

Contents?: true

Size: 501 Bytes

Versions: 18

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@mhenrixon.com>
    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

18 entries across 18 versions & 1 rubygems

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