|
@@ -23,11 +23,11 @@ R = aioredis.from_url(redis_info['host'], password=redis_info['password'])
|
|
# return await aioredis.from_url(redis_info['host'], password=redis_info['password'])
|
|
# return await aioredis.from_url(redis_info['host'], password=redis_info['password'])
|
|
|
|
|
|
async def pg_getdata(sql):
|
|
async def pg_getdata(sql):
|
|
- P = await aiopg.connect(database=pg_info['dbname'],
|
|
|
|
- user=pg_info['user'],
|
|
|
|
- password=pg_info['password'],
|
|
|
|
- host=pg_info['host'],
|
|
|
|
- port=pg_info['port'])
|
|
|
|
|
|
+ # P = await aiopg.connect(database=pg_info['dbname'],
|
|
|
|
+ # user=pg_info['user'],
|
|
|
|
+ # password=pg_info['password'],
|
|
|
|
+ # host=pg_info['host'],
|
|
|
|
+ # port=pg_info['port'])
|
|
cur = await P.cursor()
|
|
cur = await P.cursor()
|
|
await cur.execute(sql)
|
|
await cur.execute(sql)
|
|
ret = await cur.fetchall()
|
|
ret = await cur.fetchall()
|