Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hivemind
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
hivemind
Commits
29508cf8
Commit
29508cf8
authored
4 years ago
by
Bartek Wrona
Browse files
Options
Downloads
Plain Diff
Merge branch '100-enable-connecting-to-postgres-server-via-unix-socket' into 'develop'
Handle postgres connection string with unix socket, fix
#100
See merge request
!374
parents
06826c9d
d868e239
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!456
Release candidate v1 24
,
!374
Handle postgres connection string with unix socket, fix #100
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
hive/server/db.py
+14
-7
14 additions, 7 deletions
hive/server/db.py
with
14 additions
and
7 deletions
hive/server/db.py
+
14
−
7
View file @
29508cf8
...
...
@@ -38,13 +38,20 @@ class Db:
async
def
init
(
self
,
url
):
"""
Initialize the aiopg.sa engine.
"""
conf
=
make_url
(
url
)
self
.
db
=
await
create_engine
(
user
=
conf
.
username
,
database
=
conf
.
database
,
password
=
conf
.
password
,
host
=
conf
.
host
,
port
=
conf
.
port
,
maxsize
=
20
,
**
conf
.
query
)
dsn
=
{}
if
conf
.
username
:
dsn
[
'
user
'
]
=
conf
.
username
if
conf
.
database
:
dsn
[
'
database
'
]
=
conf
.
database
if
conf
.
password
:
dsn
[
'
password
'
]
=
conf
.
password
if
conf
.
host
:
dsn
[
'
host
'
]
=
conf
.
host
if
conf
.
port
:
dsn
[
'
port
'
]
=
conf
.
port
if
'
application_name
'
not
in
conf
.
query
:
dsn
[
'
application_name
'
]
=
'
hive_server
'
self
.
db
=
await
create_engine
(
**
dsn
,
maxsize
=
20
,
**
conf
.
query
)
def
close
(
self
):
"""
Close pool.
"""
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment