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_host": "localhost",
|
||||||
"pg_db": "rcgcdb",
|
"pg_db": "rcgcdb",
|
||||||
"pg_pass": "secret_password",
|
"pg_pass": "secret_password",
|
||||||
|
"pg_port": "5432",
|
||||||
"irc_servers": {
|
"irc_servers": {
|
||||||
"your custom name for the farm": {
|
"your custom name for the farm": {
|
||||||
"domains": ["wikipedia.org", "otherwikipedia.org"],
|
"domains": ["wikipedia.org", "otherwikipedia.org"],
|
||||||
|
|
|
@ -15,7 +15,8 @@ class db_connection:
|
||||||
# as a "postgres" user.
|
# as a "postgres" user.
|
||||||
logger.debug("Setting up the Database connection...")
|
logger.debug("Setting up the Database connection...")
|
||||||
self.connection = await asyncpg.create_pool(user=settings["pg_user"], host=settings.get("pg_host", "localhost"),
|
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))
|
logger.debug("Database connection established! Connection: {}".format(self.connection))
|
||||||
|
|
||||||
async def shutdown_connection(self):
|
async def shutdown_connection(self):
|
||||||
|
|
Loading…
Reference in a new issue