|
@@ -19,6 +19,7 @@ type TileConvertorResult struct {
|
|
|
GroupId string `json:"groupId"`
|
|
|
SourcePath string `json:"sourcePath"`
|
|
|
TilePath string `json:"tilePath"`
|
|
|
+ Error string `json:"error"`
|
|
|
}
|
|
|
|
|
|
func CreateTileConvResultWather(app *conf.AppConf) *comm.NatsStreamWather {
|
|
@@ -58,7 +59,7 @@ func CreateRepoCtx() *repo.RepoSession {
|
|
|
|
|
|
func RepoTileConvResult(data *TileConvertorResult) error {
|
|
|
|
|
|
- fmt.Println("RepoTileConvResult", data.AssetId, data.GroupId, data.TilePath)
|
|
|
+ fmt.Println("RepoTileConvResult", data.AssetId, data.GroupId, data.TilePath, data.Error)
|
|
|
|
|
|
asset := &model.Asset360Fake3d{}
|
|
|
ok, _ := repo.RepoSeachDoc(CreateRepoCtx(), &repo.DocSearchOptions{
|
|
@@ -78,8 +79,15 @@ func RepoTileConvResult(data *TileConvertorResult) error {
|
|
|
if len(strs) == 2 {
|
|
|
asset.Thumbnail = path.Join(strs[1], "00_00_cover.png")
|
|
|
}
|
|
|
- g.Url = data.TilePath
|
|
|
- g.State = model.GROUPSTATE_SUCC
|
|
|
+
|
|
|
+ if len(data.Error) > 0 { //有错误
|
|
|
+ g.Url = data.TilePath
|
|
|
+ g.State = model.GROUPSTATE_FAIL
|
|
|
+ } else {
|
|
|
+ g.Url = data.TilePath
|
|
|
+ g.State = model.GROUPSTATE_SUCC
|
|
|
+ }
|
|
|
+ break
|
|
|
}
|
|
|
}
|
|
|
}
|