From 382137d77055db6c58534aa56ffbf0fbf7a2d70c Mon Sep 17 00:00:00 2001 From: postmannen Date: Wed, 10 Nov 2021 16:10:51 +0100 Subject: [PATCH] updated comments --- requests.go | 7 ++----- server.go | 8 ++++++++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/requests.go b/requests.go index e4320bf..f323fc7 100644 --- a/requests.go +++ b/requests.go @@ -1134,13 +1134,10 @@ func (m methodREQCliCommand) handler(proc process, message Message, node string) var stderr bytes.Buffer cmd.Stdout = &out cmd.Stderr = &stderr + err := cmd.Run() if err != nil { - if err != nil { - log.Printf("error: failed cmd.Run: %v\n", err) - } - - er := fmt.Errorf("error: methodREQCliCommand: cmd.Run : %v, methodArgs: %v, error_output: %v", err, message.MethodArgs, stderr.String()) + er := fmt.Errorf("error: methodREQCliCommand: cmd.Run failed : %v, methodArgs: %v, error_output: %v", err, message.MethodArgs, stderr.String()) sendErrorLogMessage(proc.configuration, proc.processes.metrics, proc.toRingbufferCh, proc.node, er) log.Printf("%v\n", er) } diff --git a/server.go b/server.go index 0c711c5..00631b6 100644 --- a/server.go +++ b/server.go @@ -439,6 +439,14 @@ func (s *server) routeMessagesToProcess(dbFileName string) { } // -------------------------- + + // TODO: Check out if we actually need the SAM structure anymore in + // the flow before we come here to this point. Reason for thinking + // about this is that we replace the SAM.subject in the relay above, + // and maybe it makes more sense to move the creation here instead + // so we could for example just store messages in the k/v database + // to make things simpler. + subjName := sam.Subject.name() pn := processNameGet(subjName, processKindPublisher)