| 68 | } |
| 69 | |
| 70 | func handleSnapStatus() { |
| 71 | _ = global.DB.Model(&model.Snapshot{}).Where("status = ?", "OnSaveData"). |
| 72 | Updates(map[string]interface{}{"status": constant.StatusSuccess}).Error |
| 73 | |
| 74 | _ = global.DB.Model(&model.Snapshot{}).Where("status = ?", constant.StatusWaiting). |
| 75 | Updates(map[string]interface{}{ |
| 76 | "status": constant.StatusFailed, |
| 77 | "message": constant.InterruptedMsg, |
| 78 | }).Error |
| 79 | |
| 80 | _ = global.DB.Model(&model.Snapshot{}).Where("recover_status = ?", constant.StatusWaiting). |
| 81 | Updates(map[string]interface{}{ |
| 82 | "recover_status": constant.StatusFailed, |
| 83 | "recover_message": constant.InterruptedMsg, |
| 84 | }).Error |
| 85 | |
| 86 | _ = global.DB.Model(&model.Snapshot{}).Where("rollback_status = ?", constant.StatusWaiting). |
| 87 | Updates(map[string]interface{}{ |
| 88 | "rollback_status": constant.StatusFailed, |
| 89 | "rollback_message": constant.InterruptedMsg, |
| 90 | }).Error |
| 91 | } |
| 92 | |
| 93 | func handleCronjobStatus() { |
| 94 | var jobRecords []model.JobRecords |