1
0
Fork 0
mirror of https://github.com/postmannen/ctrl.git synced 2025-03-05 06:46:48 +00:00

updated comments

This commit is contained in:
postmannen 2021-11-10 16:10:51 +01:00
parent 452e3a2e43
commit 382137d770
2 changed files with 10 additions and 5 deletions

View file

@ -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)
}

View file

@ -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)