Merge pull request 'by Robin at 20240223' (#134) from feat-20240117-001-Robin into test
Reviewed-on: #134
This commit is contained in:
commit
e2be821d62
|
@ -143,14 +143,15 @@ func (s *CronService) ImageAuditBatch(ctx context.Context, param *xxl.RunReq) (m
|
||||||
batchId := imageaudit.RefreshBatchId()
|
batchId := imageaudit.RefreshBatchId()
|
||||||
// 执行图像审核
|
// 执行图像审核
|
||||||
successNum, failNum, err := imageaudit.Run(batchId)
|
successNum, failNum, err := imageaudit.Run(batchId)
|
||||||
|
// 同步图像审核结果
|
||||||
|
err1 := DefaultService.utilSyncImageAuditTaskResultByBatchId(&gin.Context{}, batchId)
|
||||||
|
if err1 != nil {
|
||||||
|
return fmt.Sprintf("ERROR : batchId : %v, image audit tasks of this batchId have failed to syncronize, err :%v", batchId, err)
|
||||||
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Sprintf("ERROR : batchId : %v, image audit tasks of this batchId have failed, successNum: %v, failNum: %v, err :%v", batchId, successNum, failNum, err)
|
return fmt.Sprintf("ERROR : batchId : %v, image audit tasks of this batchId have failed, successNum: %v, failNum: %v, err :%v", batchId, successNum, failNum, err)
|
||||||
}
|
}
|
||||||
// 同步图像审核结果
|
|
||||||
err = DefaultService.utilSyncImageAuditTaskResultByBatchId(&gin.Context{}, batchId)
|
|
||||||
if err != nil {
|
|
||||||
return fmt.Sprintf("ERROR : batchId : %v, image audit tasks of this batchId have failed to syncronize, err :%v", batchId, err)
|
|
||||||
}
|
|
||||||
logger.Info("Image audit batch ends...")
|
logger.Info("Image audit batch ends...")
|
||||||
return fmt.Sprintf("batchId : %v, image audit tasks of this batchId have finished, successNum: %v, failNum: %v", batchId, successNum, failNum)
|
return fmt.Sprintf("batchId : %v, image audit tasks of this batchId have finished, successNum: %v, failNum: %v", batchId, successNum, failNum)
|
||||||
}
|
}
|
||||||
|
@ -161,14 +162,14 @@ func (s *CronService) ImageAuditBatchHis(ctx context.Context, param *xxl.RunReq)
|
||||||
batchId := param.ExecutorParams
|
batchId := param.ExecutorParams
|
||||||
// 执行图像审核
|
// 执行图像审核
|
||||||
successNum, failNum, err := imageaudit.Run(batchId)
|
successNum, failNum, err := imageaudit.Run(batchId)
|
||||||
|
// 同步图像审核结果
|
||||||
|
err1 := DefaultService.utilSyncImageAuditTaskResultByBatchId(&gin.Context{}, batchId)
|
||||||
|
if err1 != nil {
|
||||||
|
return fmt.Sprintf("ERROR : batchId : %v, image audit tasks of this batchId have failed to syncronize, err :%v", batchId, err)
|
||||||
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Sprintf("ERROR : batchId : %v, image audit tasks of this batchId have failed, successNum: %v, failNum: %v, err :%v", batchId, successNum, failNum, err)
|
return fmt.Sprintf("ERROR : batchId : %v, image audit tasks of this batchId have failed, successNum: %v, failNum: %v, err :%v", batchId, successNum, failNum, err)
|
||||||
}
|
}
|
||||||
// 同步图像审核结果
|
|
||||||
err = DefaultService.utilSyncImageAuditTaskResultByBatchId(&gin.Context{}, batchId)
|
|
||||||
if err != nil {
|
|
||||||
return fmt.Sprintf("ERROR : batchId : %v, image audit tasks of this batchId have failed to syncronize, err :%v", batchId, err)
|
|
||||||
}
|
|
||||||
logger.Info("Image audit batch ends...")
|
logger.Info("Image audit batch ends...")
|
||||||
return fmt.Sprintf("batchId : %v, image audit tasks of this batchId have finished, successNum: %v, failNum: %v", batchId, successNum, failNum)
|
return fmt.Sprintf("batchId : %v, image audit tasks of this batchId have finished, successNum: %v, failNum: %v", batchId, successNum, failNum)
|
||||||
}
|
}
|
||||||
|
@ -179,14 +180,14 @@ func (s *CronService) TextAuditBatch(ctx context.Context, param *xxl.RunReq) (ms
|
||||||
batchId := textaudit.RefreshBatchId()
|
batchId := textaudit.RefreshBatchId()
|
||||||
// 执行文字审核
|
// 执行文字审核
|
||||||
successNum, failNum, err := textaudit.Run(batchId)
|
successNum, failNum, err := textaudit.Run(batchId)
|
||||||
|
// 同步文字审核结果
|
||||||
|
err1 := DefaultService.utilSyncTextAuditTaskResultByBatchId(&gin.Context{}, batchId)
|
||||||
|
if err1 != nil {
|
||||||
|
return fmt.Sprintf("ERROR : batchId : %v, text audit tasks of this batchId have failed to syncronize, err :%v", batchId, err)
|
||||||
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Sprintf("ERROR : batchId : %v, text audit tasks of this batchId have failed, successNum: %v, failNum: %v, err :%v", batchId, successNum, failNum, err)
|
return fmt.Sprintf("ERROR : batchId : %v, text audit tasks of this batchId have failed, successNum: %v, failNum: %v, err :%v", batchId, successNum, failNum, err)
|
||||||
}
|
}
|
||||||
// 同步文字审核结果
|
|
||||||
err = DefaultService.utilSyncTextAuditTaskResultByBatchId(&gin.Context{}, batchId)
|
|
||||||
if err != nil {
|
|
||||||
return fmt.Sprintf("ERROR : batchId : %v, text audit tasks of this batchId have failed to syncronize, err :%v", batchId, err)
|
|
||||||
}
|
|
||||||
logger.Info("Text audit batch ends...")
|
logger.Info("Text audit batch ends...")
|
||||||
return fmt.Sprintf("batchId : %v, text audit tasks of this batchId have finished, successNum: %v, failNum: %v", batchId, successNum, failNum)
|
return fmt.Sprintf("batchId : %v, text audit tasks of this batchId have finished, successNum: %v, failNum: %v", batchId, successNum, failNum)
|
||||||
}
|
}
|
||||||
|
@ -197,14 +198,14 @@ func (s *CronService) TextAuditBatchHis(ctx context.Context, param *xxl.RunReq)
|
||||||
batchId := param.ExecutorParams
|
batchId := param.ExecutorParams
|
||||||
// 执行文字审核
|
// 执行文字审核
|
||||||
successNum, failNum, err := textaudit.Run(batchId)
|
successNum, failNum, err := textaudit.Run(batchId)
|
||||||
|
// 同步文字审核结果
|
||||||
|
err1 := DefaultService.utilSyncTextAuditTaskResultByBatchId(&gin.Context{}, batchId)
|
||||||
|
if err1 != nil {
|
||||||
|
return fmt.Sprintf("ERROR : batchId : %v, text audit tasks of this batchId have failed to syncronize, err :%v", batchId, err)
|
||||||
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Sprintf("ERROR : batchId : %v, text audit tasks of this batchId have failed, successNum: %v, failNum: %v, err :%v", batchId, successNum, failNum, err)
|
return fmt.Sprintf("ERROR : batchId : %v, text audit tasks of this batchId have failed, successNum: %v, failNum: %v, err :%v", batchId, successNum, failNum, err)
|
||||||
}
|
}
|
||||||
// 同步文字审核结果
|
|
||||||
err = DefaultService.utilSyncTextAuditTaskResultByBatchId(&gin.Context{}, batchId)
|
|
||||||
if err != nil {
|
|
||||||
return fmt.Sprintf("ERROR : batchId : %v, text audit tasks of this batchId have failed to syncronize, err :%v", batchId, err)
|
|
||||||
}
|
|
||||||
logger.Info("Text audit batch ends...")
|
logger.Info("Text audit batch ends...")
|
||||||
return fmt.Sprintf("batchId : %v, text audit tasks of this batchId have finished, successNum: %v, failNum: %v", batchId, successNum, failNum)
|
return fmt.Sprintf("batchId : %v, text audit tasks of this batchId have finished, successNum: %v, failNum: %v", batchId, successNum, failNum)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue