diff --git a/service/repositories/image_handle.go b/service/repositories/image_handle.go index 7c05432c..a8ecf8d6 100644 --- a/service/repositories/image_handle.go +++ b/service/repositories/image_handle.go @@ -239,14 +239,6 @@ type TemplateTagColor struct { } func (l *defaultImageHandle) LogoCombine(ctx context.Context, in *LogoCombineReq) (*LogoCombineRes, error) { - fmt.Println("算法请求轮训下标:", globalBLMServiceIndex) - var bLMServicePort = l.BLMServicePorts[globalBLMServiceIndex] - if len(l.BLMServicePorts) == (globalBLMServiceIndex + 1) { - globalBLMServiceIndex = 0 - } else { - globalBLMServiceIndex = globalBLMServiceIndex + 1 - } - logoResourceId := s3url_to_s3id.GetS3ResourceIdFormUrl(in.LogoUrl) if logoResourceId == "" { return nil, errors.New("invalid logo url") @@ -335,6 +327,14 @@ func (l *defaultImageHandle) LogoCombine(ctx context.Context, in *LogoCombineReq postMap["tag_data"] = in.ProductTemplateTagGroups postMap["param_data"] = combineParam + fmt.Println("算法请求轮训下标:", globalBLMServiceIndex) + var bLMServicePort = l.BLMServicePorts[globalBLMServiceIndex] + if len(l.BLMServicePorts) == (globalBLMServiceIndex + 1) { + globalBLMServiceIndex = 0 + } else { + globalBLMServiceIndex = globalBLMServiceIndex + 1 + } + logc.Infof(ctx, "合图--算法请求--合图--开始时间:%v", time.Now().UTC()) var startTimeLogoCombine = time.Now().UnixMilli() //合图--处理--开始时间 @@ -430,14 +430,6 @@ type ( /* 图片裁剪 */ func (l *defaultImageHandle) LogoStandard(ctx context.Context, in *LogoStandardReq) (*LogoStandardRes, error) { - fmt.Println("算法请求轮训下标:", globalBLMServiceIndex) - var bLMServicePort = l.BLMServicePorts[globalBLMServiceIndex] - if len(l.BLMServicePorts) == (globalBLMServiceIndex + 1) { - globalBLMServiceIndex = 0 - } else { - globalBLMServiceIndex = globalBLMServiceIndex + 1 - } - var ismaxProportion bool var imgColor []string var logoStandardMetaData LogoStandardMetaData @@ -480,6 +472,14 @@ func (l *defaultImageHandle) LogoStandard(ctx context.Context, in *LogoStandardR postMap["height"] = in.Height postMap["proportion"] = in.Proportion + fmt.Println("算法请求轮训下标:", globalBLMServiceIndex) + var bLMServicePort = l.BLMServicePorts[globalBLMServiceIndex] + if len(l.BLMServicePorts) == (globalBLMServiceIndex + 1) { + globalBLMServiceIndex = 0 + } else { + globalBLMServiceIndex = globalBLMServiceIndex + 1 + } + logc.Infof(ctx, "算法请求--去背景--开始时间:%v", time.Now().UTC()) err = curl.NewClient(ctx, &curl.Config{ BaseUrl: *l.BLMServiceUrl + ":" + bLMServicePort,