Add method Diversipub::Main#postgresql_pool
This commit is contained in:
parent
91a65d0274
commit
25d7fc96d0
1 changed files with 13 additions and 0 deletions
|
@ -81,6 +81,19 @@ module Diversipub
|
|||
end.freeze
|
||||
end
|
||||
|
||||
def postgresql_pool
|
||||
@postgresql_pool ||= ConnectionPool.new do
|
||||
PG.connect(
|
||||
host: 'localhost',
|
||||
dbname: 'diversipub',
|
||||
user: 'diversipub',
|
||||
password: 'diversipub',
|
||||
).tap do |conn|
|
||||
conn.type_map_for_results = PG::BasicTypeMapForResults.new conn
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def puma_task
|
||||
@puma_task ||= PumaTask.new self
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue