|
|
@@ -917,16 +917,22 @@ func HandleUnDecompressAttachment() { |
|
|
|
} |
|
|
|
|
|
|
|
for _, attach := range attachs { |
|
|
|
err = worker.SendDecompressTask(contexExt.Background(), attach.UUID, attach.Name) |
|
|
|
if err != nil { |
|
|
|
log.Error("SendDecompressTask(%s) failed:%s", attach.UUID, err.Error()) |
|
|
|
} else { |
|
|
|
attach.DecompressState = models.DecompressStateIng |
|
|
|
err = models.UpdateAttachment(attach) |
|
|
|
if attach.Type == models.TypeCloudBrainOne { |
|
|
|
err = worker.SendDecompressTask(contexExt.Background(), attach.UUID, attach.Name) |
|
|
|
if err != nil { |
|
|
|
log.Error("UpdateAttachment state(%s) failed:%s", attach.UUID, err.Error()) |
|
|
|
log.Error("SendDecompressTask(%s) failed:%s", attach.UUID, err.Error()) |
|
|
|
} else { |
|
|
|
attach.DecompressState = models.DecompressStateIng |
|
|
|
err = models.UpdateAttachment(attach) |
|
|
|
if err != nil { |
|
|
|
log.Error("UpdateAttachment state(%s) failed:%s", attach.UUID, err.Error()) |
|
|
|
} |
|
|
|
} |
|
|
|
} else if attach.Type == models.TypeCloudBrainTwo { |
|
|
|
attachjson, _ := json.Marshal(attach) |
|
|
|
labelmsg.SendDecompressAttachToLabelOBS(string(attachjson)) |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return |
|
|
|