From d6bb3a9a420bf5c3ea8da8f9e16868ccccdd9ac5 Mon Sep 17 00:00:00 2001 From: andoriyaprashant Date: Sat, 6 Jul 2024 12:31:37 +0530 Subject: [PATCH] goimports --- .../subscriber/pkg/events/chaosengine.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/chaoscenter/subscriber/pkg/events/chaosengine.go b/chaoscenter/subscriber/pkg/events/chaosengine.go index 5056776dc80..a829d5608b3 100644 --- a/chaoscenter/subscriber/pkg/events/chaosengine.go +++ b/chaoscenter/subscriber/pkg/events/chaosengine.go @@ -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)