Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions backend/apps/datasource/api/datasource.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ async def get_tables(session: SessionDep, id: int):
@router.post("/getTablesByConf")
async def get_tables_by_conf(session: SessionDep, trans: Trans, ds: CoreDatasource):
try:
return getTablesByDs(session, ds)
def inner():
return getTablesByDs(session, ds)

await asyncio.to_thread(inner)
except Exception as e:
# check ds status
def inner():
Expand All @@ -111,7 +114,10 @@ def inner():
@router.post("/getSchemaByConf")
async def get_schema_by_conf(session: SessionDep, trans: Trans, ds: CoreDatasource):
try:
return get_schema(ds)
def inner():
return get_schema(ds)

await asyncio.to_thread(inner)
except Exception as e:
# check ds status
def inner():
Expand Down