Sha256: 747280115ce9db0efc4d5c3a3e88a602ab3f6bf8e3941ca2eb80a12f78b96ec9

Contents?: true

Size: 333 Bytes

Versions: 51

Compression:

Stored size: 333 Bytes

Contents

require 'with_advisory_lock'

module ClosureTree
  module WithAdvisoryLock
    def ct_with_advisory_lock(&block)
      if closure_tree_options[:with_advisory_lock]
        with_advisory_lock("closure_tree") do
          transaction do
            yield
          end
        end
      else
        yield
      end
    end
  end
end

Version data entries

51 entries across 51 versions & 2 rubygems

Version Path
lalala-4.0.0.dev.136 vendor/deps/closure_tree/lib/closure_tree/with_advisory_lock.rb
lalala-4.0.0.dev.135 vendor/deps/closure_tree/lib/closure_tree/with_advisory_lock.rb
lalala-4.0.0.dev.134 vendor/deps/closure_tree/lib/closure_tree/with_advisory_lock.rb
lalala-4.0.0.dev.133 vendor/deps/closure_tree/lib/closure_tree/with_advisory_lock.rb
lalala-4.0.0.dev.132 vendor/deps/closure_tree/lib/closure_tree/with_advisory_lock.rb
lalala-4.0.0.dev.131 vendor/deps/closure_tree/lib/closure_tree/with_advisory_lock.rb
lalala-4.0.0.dev.129 vendor/deps/closure_tree/lib/closure_tree/with_advisory_lock.rb
lalala-4.0.0.dev.128 vendor/deps/closure_tree/lib/closure_tree/with_advisory_lock.rb
lalala-4.0.0.dev.126 vendor/deps/closure_tree/lib/closure_tree/with_advisory_lock.rb
lalala-4.0.0.dev.125 vendor/deps/closure_tree/lib/closure_tree/with_advisory_lock.rb
lalala-4.0.0.dev.124 vendor/deps/closure_tree/lib/closure_tree/with_advisory_lock.rb
lalala-4.0.0.dev.123 vendor/deps/closure_tree/lib/closure_tree/with_advisory_lock.rb
lalala-4.0.0.dev.118 vendor/deps/closure_tree/lib/closure_tree/with_advisory_lock.rb
lalala-4.0.0.dev.116 vendor/deps/closure_tree/lib/closure_tree/with_advisory_lock.rb
lalala-4.0.0.dev.114 vendor/deps/closure_tree/lib/closure_tree/with_advisory_lock.rb
lalala-4.0.0.dev.113 vendor/deps/closure_tree/lib/closure_tree/with_advisory_lock.rb
lalala-4.0.0.dev.111 vendor/deps/closure_tree/lib/closure_tree/with_advisory_lock.rb
lalala-4.0.0.dev.109 vendor/deps/closure_tree/lib/closure_tree/with_advisory_lock.rb
lalala-4.0.0.dev.107 vendor/deps/closure_tree/lib/closure_tree/with_advisory_lock.rb
lalala-4.0.0.dev.94 vendor/deps/closure_tree/lib/closure_tree/with_advisory_lock.rb