File: with_advisory_lock.rb

package info (click to toggle)
ruby-with-advisory-lock 5.3.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 244 kB
  • sloc: ruby: 818; makefile: 14
file content (18 lines) | stat: -rw-r--r-- 378 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
require 'with_advisory_lock/version'
require 'active_support'
require 'zeitwerk'

loader = Zeitwerk::Loader.for_gem
loader.inflector.inflect(
  'mysql' => 'MySQL',
  'postgresql' => 'PostgreSQL',
  )
loader.setup

module WithAdvisoryLock
  LOCK_PREFIX_ENV = 'WITH_ADVISORY_LOCK_PREFIX'.freeze
end

ActiveSupport.on_load :active_record do
  include WithAdvisoryLock::Concern
end