Skip to content

Commit

Permalink
add backuprepo
Browse files Browse the repository at this point in the history
  • Loading branch information
wallyxjh committed Aug 21, 2024
1 parent bd3f6d4 commit 68bdc89
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,14 @@ func processBackup(backup unstructured.Unstructured) {
if cluster != nil && errors.IsNotFound(err) {
return
}
dbStatus, _, _ := unstructured.NestedString(cluster.Object, "status", "phase")
dbStatus, found, err := unstructured.NestedString(cluster.Object, "status", "phase")
if err != nil {
log.Printf("Unable to get %s phase in %s:%v", backupName, namespace, err)
return
}
if !found {
fmt.Println("111")
}
if dbStatus == "Stopped" {
return
}
Expand Down

0 comments on commit 68bdc89

Please sign in to comment.