by Robin at 20240428
This commit is contained in:
parent
217a53d6b2
commit
58a238e9c9
|
@ -61,6 +61,7 @@ func Run(batchId string) (successNum int, failNum int, err error) {
|
|||
ConnectTimeout: tea.Int(30000),
|
||||
}
|
||||
|
||||
results := make([]*imageaudit.ScanImageResponseBodyDataResults, 0)
|
||||
for _, req := range reqs {
|
||||
var _result *imageaudit.ScanImageResponse
|
||||
_result, err = defaultImageAuditClient.ScanImageAdvance(req, runtime)
|
||||
|
@ -72,11 +73,12 @@ func Run(batchId string) (successNum int, failNum int, err error) {
|
|||
failNum = len(imageaudittasks)
|
||||
return
|
||||
}
|
||||
results = append(results, _result.Body.Data.Results...)
|
||||
logger.Info("Receive the response from ScanImageAdvance: %v", _result.String())
|
||||
}
|
||||
|
||||
// 4.处理应答
|
||||
err = handleScanImageResponse(ctrlBlock, _result)
|
||||
}
|
||||
err = handleScanImageResponseBodyDataResults(ctrlBlock, results)
|
||||
|
||||
successNum = len(imageaudittasks)
|
||||
return
|
||||
|
@ -126,8 +128,7 @@ func createScanImageAdvanceRequest(ctrlBlock *ImageAuditTaskBatchControlBlock) (
|
|||
return
|
||||
}
|
||||
|
||||
func handleScanImageResponse(ctrlBlock *ImageAuditTaskBatchControlBlock, resp *imageaudit.ScanImageResponse) (err error) {
|
||||
results := resp.Body.Data.Results
|
||||
func handleScanImageResponseBodyDataResults(ctrlBlock *ImageAuditTaskBatchControlBlock, results []*imageaudit.ScanImageResponseBodyDataResults) (err error) {
|
||||
taskCtrlBlocks := ctrlBlock.TaskCtrlBlocks
|
||||
img2taskIndexMap := ctrlBlock.Img2taskIndexMap
|
||||
actionMap := ctrlBlock.ActionMap
|
||||
|
|
Loading…
Reference in New Issue