diff --git a/sgx_jmp.rb b/sgx_jmp.rb index b298c5096f979a97b7588c725d07b8160e50b979..0c4a40f868fd635960263ae034718296a8b1f697 100644 --- a/sgx_jmp.rb +++ b/sgx_jmp.rb @@ -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)