MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / handleSnapStatus

Function handleSnapStatus

agent/init/hook/hook.go:70–91  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

68}
69
70func 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
93func handleCronjobStatus() {
94 var jobRecords []model.JobRecords

Callers 1

InitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected