Change summary
sgx_jmp.rb | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Detailed changes
@@ -144,6 +144,7 @@ def panic(e, hub=nil)
end
EM.error_handler(&method(:panic))
+EM.threadpool_size = 10
require_relative "lib/blather_client"
@client = BlatherClient.new
@@ -220,7 +221,7 @@ when_ready do
REDIS = EM::Hiredis.connect
MEMCACHE = EM::P::Memcache.connect
BTC_SELL_PRICES = BTCSellPrices.new(REDIS, CONFIG[:oxr_app_id])
- DB = Postgres.connect(dbname: "jmp", size: 25)
+ DB = Postgres.connect(dbname: "jmp", size: EM.threadpool_size + 2)
TEL_SELECTIONS = TelSelections.new
DB.hold do |conn|