From 0003d147a04f374ca6d2f2f996321c0d72ab9c12 Mon Sep 17 00:00:00 2001 From: qiwang <1364512070@qq.com> Date: Thu, 19 Sep 2024 08:45:37 +0800 Subject: [PATCH] fix: update modelarts ServiceName now.Unix of ai --- internal/storeLink/modelarts.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/storeLink/modelarts.go b/internal/storeLink/modelarts.go index d718e8cb..36022ac5 100644 --- a/internal/storeLink/modelarts.go +++ b/internal/storeLink/modelarts.go @@ -791,11 +791,14 @@ func (m *ModelArtsLink) CreateInferDeployInstance(ctx context.Context, option *o } var configItems []*modelarts.ServiceConfig configItems = append(configItems, configParam) + now := time.Now() + timestampSec := now.Unix() + str := strconv.FormatInt(timestampSec, 10) req := &modelarts.CreateServiceReq{ Platform: m.platform, Config: configItems, InferType: "real-time", - ServiceName: option.ModelName + "_" + option.ModelType + "_" + Npu, + ServiceName: option.ModelName + "_" + option.ModelType + "_" + Npu + "_" + str, } ctx, cancel := context.WithTimeout(context.Background(), 150*time.Second) defer cancel()