diff --git a/library/contentaudit/imageaudit/task.go b/library/contentaudit/imageaudit/task.go index bbb631a7..d057aed4 100644 --- a/library/contentaudit/imageaudit/task.go +++ b/library/contentaudit/imageaudit/task.go @@ -24,6 +24,7 @@ func AddTasks(tasks []*dbstruct.ImageAuditTask) error { func AddTask(task *dbstruct.ImageAuditTask) error { // 若非对齐任务,则进行插入前预处理 + task.BatchId = goproto.String(defaultImageAuditTaskScheduler.batchId) if !task.IsForAlignment() { if task == nil || task.AuditedMedia == nil { return nil @@ -33,7 +34,6 @@ func AddTask(task *dbstruct.ImageAuditTask) error { return nil } - task.BatchId = goproto.String(defaultImageAuditTaskScheduler.batchId) task.Status = goproto.Int64(consts.ImageAudit_Created) if fragmentNum == 1 { diff --git a/library/contentaudit/textaudit/task.go b/library/contentaudit/textaudit/task.go index 35653384..5fea2448 100644 --- a/library/contentaudit/textaudit/task.go +++ b/library/contentaudit/textaudit/task.go @@ -23,12 +23,12 @@ func AddTasks(tasks []*dbstruct.TextAuditTask) error { func AddTask(task *dbstruct.TextAuditTask) error { // 若非对齐任务,则进行插入前预处理 + task.BatchId = goproto.String(defaultTextAuditTaskScheduler.batchId) if !task.IsForAlignment() { if task == nil || task.AuditedText == nil { return nil } - task.BatchId = goproto.String(defaultTextAuditTaskScheduler.batchId) task.Status = goproto.Int64(consts.TextAudit_Created) // 1.写入文字审核表