Sha256: b873eaa8feadf383ac063e0755a56d8dddd73e8423cdfd38bbf9a84b97683c74
Contents?: true
Size: 492 Bytes
Versions: 18
Compression:
Stored size: 492 Bytes
Contents
database_setup_proc = lambda do |conn| # identify postgres connections coming from this process in pg_stat_activity process_identifier = ENV["DYNO"] || File.basename($PROGRAM_NAME).gsub(/\W+/, "_") conn.execute "SET statement_timeout = '#{Config.database_timeout}s'" conn.execute "SET application_name = '#{process_identifier}'" end DB = Sequel.connect(Config.database_url, max_connections: Config.db_pool, after_connect: database_setup_proc)
Version data entries
18 entries across 18 versions & 1 rubygems