mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 02:19:27 +08:00
FIX: Use exact patht to ensure we always redirect with the right format.
This commit is contained in:
parent
5324c01209
commit
d4388f54a2
|
@ -3,7 +3,7 @@ development:
|
|||
adapter: postgresql
|
||||
database: <%= ENV['DISCOURSE_DEV_DB'] || 'discourse_development' %>
|
||||
min_messages: warning
|
||||
pool: 10
|
||||
pool: 5
|
||||
timeout: 5000
|
||||
host_names:
|
||||
### Don't include the port number here. Change the "port" site setting instead, at /admin/site_settings.
|
||||
|
@ -20,7 +20,7 @@ test:
|
|||
adapter: postgresql
|
||||
database: discourse_test<%= ENV['MULTISITE'] ? "_#{ENV['MULTISITE']}" : '' %>
|
||||
min_messages: warning
|
||||
pool: 10
|
||||
pool: 5
|
||||
timeout: 5000
|
||||
host_names:
|
||||
- test.localhost
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
development:
|
||||
:concurrency: 5
|
||||
:concurrency: 1
|
||||
:queues:
|
||||
- [critical,4]
|
||||
- [default, 2]
|
||||
|
|
|
@ -119,14 +119,7 @@ module ActiveRecord
|
|||
|
||||
def verify_replica(connection)
|
||||
value = connection.raw_connection.exec("SELECT pg_is_in_recovery()").values[0][0]
|
||||
|
||||
if !value
|
||||
begin
|
||||
raise "Replica database server is not in recovery mode."
|
||||
ensure
|
||||
connection.close
|
||||
end
|
||||
end
|
||||
raise "Replica database server is not in recovery mode." if !value
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -94,15 +94,8 @@ describe ActiveRecord::ConnectionHandling do
|
|||
expect(postgresql_fallback_handler.master_down?).to eq(nil)
|
||||
expect(ActiveRecord::Base.connection_pool.connections.count).to eq(0)
|
||||
|
||||
ActiveRecord::Base.clear_all_connections!
|
||||
connection = ActiveRecord::Base.connection
|
||||
|
||||
begin
|
||||
expect(connection)
|
||||
.to be_an_instance_of(ActiveRecord::ConnectionAdapters::PostgreSQLAdapter)
|
||||
ensure
|
||||
connection.close
|
||||
end
|
||||
expect(ActiveRecord::Base.connection)
|
||||
.to be_an_instance_of(ActiveRecord::ConnectionAdapters::PostgreSQLAdapter)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user