From 89fe99e488da07011b829cdc79a5c4fc6dece9df Mon Sep 17 00:00:00 2001 From: "Alex Ellis (OpenFaaS Ltd)" Date: Mon, 9 Mar 2020 15:42:19 +0000 Subject: [PATCH] Reduce verbosity of garbage-collect The whole response was being printed which was far too verbose for the purposes of logging. Signed-off-by: Alex Ellis (OpenFaaS Ltd) --- garbage-collect/handler.go | 7 ++++++- stack.yml | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/garbage-collect/handler.go b/garbage-collect/handler.go index 39107e8a6..456f8718d 100644 --- a/garbage-collect/handler.go +++ b/garbage-collect/handler.go @@ -45,7 +45,12 @@ func Handle(req []byte) string { log.Fatal(err) } - fmt.Printf("Functions owned by %s:\n %s", owner, deployedFunctions) + deployedList := "" + for _, fn := range deployedFunctions { + deployedList += fn.GetOwner() + "/" + fn.GetRepo() + ", " + } + + fmt.Printf("Functions owned by %s:\n %s", owner, strings.Trim(deployedList, ", ")) deleted := 0 for _, fn := range deployedFunctions { diff --git a/stack.yml b/stack.yml index 4d1d516d1..7640d903d 100644 --- a/stack.yml +++ b/stack.yml @@ -95,7 +95,7 @@ functions: garbage-collect: lang: go handler: ./garbage-collect - image: functions/garbage-collect:0.4.6 + image: functions/garbage-collect:0.4.7 labels: openfaas-cloud: "1" role: openfaas-system