This commit is contained in:
laodaming 2023-08-10 11:39:57 +08:00
parent 0208110cbc
commit 3023c7d9dd

View File

@ -56,6 +56,7 @@ func (m *MqConsumerRenderAssemble) Run(ctx context.Context, data []byte) error {
logx.Error("failed to get template info:", err)
return err
}
combineImage := "" //刀版图
combineHash := hash.JsonHashKey(parseInfo) //区别于云渲染的taskid,这个用获取刀版图缓存
//获取该hash值下有没有对应的资源
resource, err := svcCtx.AllModels.FsResource.FindOneById(ctx, combineHash)
@ -63,7 +64,6 @@ func (m *MqConsumerRenderAssemble) Run(ctx context.Context, data []byte) error {
logx.Error("failed to get resource :", err)
return err
}
combineImage := "" //刀版图
//如果不存在,则请求生成刀版图
if errors.Is(err, gorm.ErrRecordNotFound) {
combineImage, err = getCombineImage(ctx, svcCtx, parseInfo, combineHash)