Skip to content

Commit

Permalink
goimports
Browse files Browse the repository at this point in the history
Signed-off-by: andoriyaprashant <[email protected]>
  • Loading branch information
andoriyaprashant committed Jul 6, 2024
1 parent 9dd43d1 commit c37037d
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions chaoscenter/subscriber/pkg/events/chaosengine.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,15 @@ func (ev *subscriberEvents) chaosEventHandler(obj interface{}, eventType string,
logrus.WithError(err).Fatal("could not get Chaos ClientSet")
}

// Update engineStatus from initialized to running
if workflowObj.Status.EngineStatus == chaosTypes.EngineStatusInitialized {
workflowObj.Status.EngineStatus = chaosTypes.EngineStatusRunning
_, err := chaosClient.ChaosEngines(workflowObj.Namespace).UpdateStatus(context.TODO(), workflowObj, v1.UpdateOptions{})
if err != nil {
logrus.WithError(err).Fatal("could not update ChaosEngine status to running")
}
logrus.Infof("Updated ChaosEngine status to running: %s/%s", workflowObj.Namespace, workflowObj.Name)
}
// Update engineStatus from initialized to running
if workflowObj.Status.EngineStatus == chaosTypes.EngineStatusInitialized {
workflowObj.Status.EngineStatus = chaosTypes.EngineStatusRunning
_, err := chaosClient.ChaosEngines(workflowObj.Namespace).UpdateStatus(context.TODO(), workflowObj, v1.UpdateOptions{})
if err != nil {
logrus.WithError(err).Fatal("could not update ChaosEngine status to running")
}
logrus.Infof("Updated ChaosEngine status to running: %s/%s", workflowObj.Namespace, workflowObj.Name)
}

nodes := make(map[string]types.Node)
logrus.Print("STANDALONE CHAOSENGINE EVENT ", workflowObj.UID, " ", eventType)
Expand Down

0 comments on commit c37037d

Please sign in to comment.