|
|
@ -147,7 +147,6 @@ async def get_tree_data():
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
pg_pool = await init_postgres_pool()
|
|
|
|
pg_pool = await init_postgres_pool()
|
|
|
|
async with pg_pool.acquire() as conn:
|
|
|
|
async with pg_pool.acquire() as conn:
|
|
|
|
await conn.ping()
|
|
|
|
|
|
|
|
async with conn.cursor() as cur:
|
|
|
|
async with conn.cursor() as cur:
|
|
|
|
await cur.execute("""
|
|
|
|
await cur.execute("""
|
|
|
|
SELECT id,
|
|
|
|
SELECT id,
|
|
|
@ -215,7 +214,6 @@ async def update_knowledge(request: fastapi.Request):
|
|
|
|
|
|
|
|
|
|
|
|
pg_pool = await init_postgres_pool()
|
|
|
|
pg_pool = await init_postgres_pool()
|
|
|
|
async with pg_pool.acquire() as conn:
|
|
|
|
async with pg_pool.acquire() as conn:
|
|
|
|
await conn.ping()
|
|
|
|
|
|
|
|
async with conn.cursor() as cur:
|
|
|
|
async with conn.cursor() as cur:
|
|
|
|
if update_type == 'prerequisite':
|
|
|
|
if update_type == 'prerequisite':
|
|
|
|
await cur.execute(
|
|
|
|
await cur.execute(
|
|
|
|