mirror of
https://github.com/Syngnat/GoNavi.git
synced 2026-08-11 17:23:48 +08:00
🐛 fix(import): 修复导入进度与任务停止
- 修正 SQL 文件执行进度提前完成及终态竞态 - 支持停止导入并保留已提交的部分统计 - 完善取消审计、多语言提示与回归测试 Refs #677 Refs #678
This commit is contained in:
@@ -710,6 +710,11 @@ func sqlAuditStatusFromResult(result connection.QueryResult) string {
|
||||
if result.Success {
|
||||
return "success"
|
||||
}
|
||||
if data, ok := result.Data.(map[string]interface{}); ok {
|
||||
if cancelled, ok := data["cancelled"].(bool); ok && cancelled {
|
||||
return "cancelled"
|
||||
}
|
||||
}
|
||||
message := strings.ToLower(strings.TrimSpace(result.Message))
|
||||
if strings.Contains(message, "context canceled") ||
|
||||
strings.Contains(message, "context cancelled") ||
|
||||
|
||||
Reference in New Issue
Block a user