Module: Gitlab::Database::Migrations::PgBackendPid
- Defined in:
- lib/gitlab/database/migrations/pg_backend_pid.rb
Defined Under Namespace
Modules: MigratorPgBackendPid
Class Method Summary
collapse
Class Method Details
.patch! ⇒ Object
22
23
24
|
# File 'lib/gitlab/database/migrations/pg_backend_pid.rb', line 22
def self.patch!
ActiveRecord::Migrator.prepend(MigratorPgBackendPid)
end
|
.say(conn) ⇒ Object
26
27
28
29
30
31
32
33
34
35
36
|
# File 'lib/gitlab/database/migrations/pg_backend_pid.rb', line 26
def self.say(conn)
return unless ActiveRecord::Migration.verbose
pg_backend_pid = conn.select_value('SELECT pg_backend_pid()')
db_name = Gitlab::Database.db_config_name(conn)
puts "#{db_name}: == [advisory_lock_connection] " \
"object_id: #{conn.object_id}, pg_backend_pid: #{pg_backend_pid}"
end
|