refactor: 数据库管理迁移至数据库实例-库管理、机器管理-文件支持用户和组信息查看

This commit is contained in:
meilin.huang
2024-05-21 12:34:26 +08:00
parent a7632fbf58
commit bb1522f4dc
29 changed files with 486 additions and 535 deletions

View File

@@ -87,16 +87,20 @@ func (app *dbTransferAppImpl) CreateLog(ctx context.Context, taskId uint64) (uin
}
func (app *dbTransferAppImpl) Run(ctx context.Context, taskId uint64, logId uint64) {
defer app.logApp.Flush(logId, true)
task, err := app.GetById(taskId)
if err != nil {
logx.Errorf("创建DBMS-执行数据迁移日志失败:%v", err)
return
}
if app.IsRunning(taskId) {
logx.Warnf("[%d]该任务正在运行中...", taskId)
return
}
start := time.Now()
defer app.logApp.Flush(logId, true)
// 修改状态与关联日志id
task.LogId = logId
task.RunningState = entity.DbTransferTaskRunStateRunning