~singpolyma/sgx-jmp

f238598f8f78cb2e34b33341600982e33a73f04a — Stephen Paul Weber 1 year, 4 months ago e5f1219
Use PG connection pool
1 files changed, 2 insertions(+), 2 deletions(-)

M sgx_jmp.rb
M sgx_jmp.rb => sgx_jmp.rb +2 -2
@@ 1,6 1,6 @@
# frozen_string_literal: true

require "pg/em"
require "pg/em/connection_pool"
require "bigdecimal"
require "blather/client/dsl" # Require this first to not auto-include
require "blather/client"


@@ 114,7 114,7 @@ when_ready do
	BLATHER = self
	REDIS = EM::Hiredis.connect
	BTC_SELL_PRICES = BTCSellPrices.new(REDIS, CONFIG[:oxr_app_id])
	DB = PG::EM::Client.new(dbname: "jmp")
	DB = PG::EM::ConnectionPool.new(dbname: "jmp")
	DB.type_map_for_results = PG::BasicTypeMapForResults.new(DB)
	DB.type_map_for_queries = PG::BasicTypeMapForQueries.new(DB)