File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
backend/apps/datasource/api Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -96,7 +96,10 @@ async def get_tables(session: SessionDep, id: int):
9696@router .post ("/getTablesByConf" )
9797async def get_tables_by_conf (session : SessionDep , trans : Trans , ds : CoreDatasource ):
9898 try :
99- return getTablesByDs (session , ds )
99+ def inner ():
100+ return getTablesByDs (session , ds )
101+
102+ await asyncio .to_thread (inner )
100103 except Exception as e :
101104 # check ds status
102105 def inner ():
@@ -111,7 +114,10 @@ def inner():
111114@router .post ("/getSchemaByConf" )
112115async def get_schema_by_conf (session : SessionDep , trans : Trans , ds : CoreDatasource ):
113116 try :
114- return get_schema (ds )
117+ def inner ():
118+ return get_schema (ds )
119+
120+ await asyncio .to_thread (inner )
115121 except Exception as e :
116122 # check ds status
117123 def inner ():
You can’t perform that action at this time.
0 commit comments