forked from Infra/risotto
add docker environment
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
MESSAGE_ROOT_PATH = 'messages'
|
||||
DATABASE_DIR = 'database'
|
||||
DATABASE_DIR = '/var/cache/risotto/database'
|
||||
INTERNAL_USER = 'internal'
|
||||
CONFIGURATION_DIR = 'configurations'
|
||||
TEMPLATE_DIR = 'templates'
|
||||
|
@ -249,7 +249,6 @@ class RegisterDispatcher:
|
||||
# valid function's arguments
|
||||
db_conf = get_config().get('database')
|
||||
|
||||
#postgres://user:pass@host:port/database?option=value.
|
||||
engine = db_conf.get('engine')
|
||||
host = db_conf.get('host')
|
||||
dbname = db_conf.get('dbname')
|
||||
@ -257,7 +256,6 @@ class RegisterDispatcher:
|
||||
dbpassword = db_conf.get('password')
|
||||
dbport = db_conf.get('port')
|
||||
cfg = "{}://{}:{}@{}:{}/{}".format(engine, dbuser, dbpassword, host, dbport, dbname)
|
||||
print(cfg)
|
||||
self.pool = await asyncpg.create_pool(cfg)
|
||||
async with self.pool.acquire() as connection:
|
||||
async with connection.transaction():
|
||||
|
Reference in New Issue
Block a user