FIX: Set PG connect_timeout to 5 seconds.

* 30 seconds is alittle too long.
This commit is contained in:
Guo Xiang Tan
2017-10-17 12:32:41 +08:00
parent 2db66072d7
commit b54eb8f53c
2 changed files with 5 additions and 2 deletions

View File

@@ -92,7 +92,7 @@ class GlobalSetting
def self.database_config
hash = { "adapter" => "postgresql" }
%w{pool timeout socket host port username password replica_host replica_port}.each do |s|
%w{pool connect_timeout timeout socket host port username password replica_host replica_port}.each do |s|
if val = self.send("db_#{s}")
hash[s] = val
end