mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 22:05:48 +08:00
DEV: Switch to db config to disable advisory locks.
This commit is contained in:
parent
35a157619a
commit
d8cd912769
|
@ -151,6 +151,7 @@ class GlobalSetting
|
|||
hash["prepared_statements"] = !!self.db_prepared_statements
|
||||
hash["idle_timeout"] = connection_reaper_age if connection_reaper_age.present?
|
||||
hash["reaping_frequency"] = connection_reaper_interval if connection_reaper_interval.present?
|
||||
hash["advisory_locks"] = !!self.db_advisory_locks
|
||||
|
||||
{ "production" => hash }
|
||||
end
|
||||
|
|
|
@ -59,6 +59,8 @@ db_replica_host =
|
|||
# port running replica db server, defaults to 5432 if not set
|
||||
db_replica_port =
|
||||
|
||||
db_advisory_locks = true
|
||||
|
||||
# hostname running the forum
|
||||
hostname = "www.example.com"
|
||||
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Awaiting decision on https://github.com/rails/rails/issues/31190
|
||||
if ENV['DISABLE_MIGRATION_ADVISORY_LOCK']
|
||||
class ActiveRecord::ConnectionAdapters::PostgreSQLAdapter
|
||||
def supports_advisory_locks?
|
||||
false
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue
Block a user