Skip to content

Commit

Permalink
完善工单详情页面的信息展示
Browse files Browse the repository at this point in the history
  • Loading branch information
Grain-Yu committed Nov 7, 2023
1 parent 49c3320 commit 7df9be4
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions sql/engines/starrocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,8 @@ def execute(self, db_name=None, sql="", close_conn=True):
for statement in sql_list:
try:
cursor = conn.cursor()
cursor.execute(statement)
with FuncTimer() as t:
effect_row = cursor.execute(statement)
cursor.close()
execute_result.rows.append(
ReviewResult(
Expand All @@ -271,8 +272,8 @@ def execute(self, db_name=None, sql="", close_conn=True):
stagestatus="Execute Successfully",
errormessage="None",
sql=statement,
affected_rows=0,
execute_time=0,
affected_rows=effect_row,
execute_time=t.cost,
)
)
except Exception as e:
Expand All @@ -287,8 +288,8 @@ def execute(self, db_name=None, sql="", close_conn=True):
stagestatus="Execute Failed",
errormessage=f"异常信息:{e}",
sql=statement,
affected_rows=0,
execute_time=0,
affected_rows=effect_row,
execute_time=t.cost,
)
)
break
Expand All @@ -299,7 +300,7 @@ def execute(self, db_name=None, sql="", close_conn=True):
ReviewResult(
id=rowid,
errlevel=2,
stagestatus="Execute Failed",
stagestatus="Audit Completed",
errormessage="前序语句失败, 未执行",
sql=statement,
affected_rows=0,
Expand Down

0 comments on commit 7df9be4

Please sign in to comment.