From a009cf4d6197f671bc52c19c7099f7680817665b Mon Sep 17 00:00:00 2001 From: 8naama Date: Thu, 1 Aug 2024 15:29:25 +0300 Subject: [PATCH] revert last change --- cfn-lambda/handler/handler.go | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/cfn-lambda/handler/handler.go b/cfn-lambda/handler/handler.go index 1003af1..62bc2a8 100644 --- a/cfn-lambda/handler/handler.go +++ b/cfn-lambda/handler/handler.go @@ -212,27 +212,26 @@ func handleFirstInvocation() error { return err } - go func() { - added := make([]string, 0) - servicesToAdd := common.GetServices() - if servicesToAdd != nil { - newAdded, err := common.AddServices(sess, servicesToAdd) - added = append(added, newAdded...) - if err != nil { - sugLog.Error(err.Error()) - } + added := make([]string, 0) + servicesToAdd := common.GetServices() + if servicesToAdd != nil { + newAdded, err := common.AddServices(sess, servicesToAdd) + added = append(added, newAdded...) + if err != nil { + sugLog.Error(err.Error()) } + } - pathsToAdd := common.GetCustomPaths() - if pathsToAdd != nil { - newAdded, err := common.AddCustom(sess, pathsToAdd, added) - added = append(added, newAdded...) - if err != nil { - sugLog.Error(err.Error()) - } + pathsToAdd := common.GetCustomPaths() + if pathsToAdd != nil { + newAdded, err := common.AddCustom(sess, pathsToAdd, added) + added = append(added, newAdded...) + if err != nil { + sugLog.Error(err.Error()) } + } - sugLog.Info("Following these log groups: ", added) - }() + sugLog.Info("Following these log groups: ", added) + return nil }