fix: 快照重试后更新列表状态 (#4086)

This commit is contained in:
ssongliu 2024-03-06 15:58:07 +08:00 committed by GitHub
parent 703da8a09a
commit fe717d993b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -216,6 +216,7 @@ func (u *SnapshotService) HandleSnapshot(isCronjob bool, logPath string, req dto
if err != nil {
return "", err
}
_ = snapshotRepo.Update(snap.ID, map[string]interface{}{"status": constant.StatusWaiting})
snapStatus, _ = snapshotRepo.GetStatus(snap.ID)
if snapStatus.ID == 0 {
snapStatus.SnapID = snap.ID