mirror of
https://gitlab.com/chicken-riders/RcGcDb.git
synced 2025-02-23 00:54:09 +00:00
Added port argument
This commit is contained in:
parent
7492229eb2
commit
0af390d80f
|
@ -12,6 +12,7 @@
|
|||
"pg_host": "localhost",
|
||||
"pg_db": "rcgcdb",
|
||||
"pg_pass": "secret_password",
|
||||
"pg_port": "5432",
|
||||
"irc_servers": {
|
||||
"your custom name for the farm": {
|
||||
"domains": ["wikipedia.org", "otherwikipedia.org"],
|
||||
|
|
|
@ -15,7 +15,8 @@ class db_connection:
|
|||
# as a "postgres" user.
|
||||
logger.debug("Setting up the Database connection...")
|
||||
self.connection = await asyncpg.create_pool(user=settings["pg_user"], host=settings.get("pg_host", "localhost"),
|
||||
database=settings.get("pg_db", "rcgcdb"), password=settings.get("pg_pass"))
|
||||
database=settings.get("pg_db", "rcgcdb"), password=settings.get("pg_pass"),
|
||||
port=settings.get("pg_port", 5432))
|
||||
logger.debug("Database connection established! Connection: {}".format(self.connection))
|
||||
|
||||
async def shutdown_connection(self):
|
||||
|
|
Loading…
Reference in a new issue