Skip to content
This repository has been archived by the owner on Mar 10, 2023. It is now read-only.

Commit

Permalink
Reduce verbosity of garbage-collect
Browse files Browse the repository at this point in the history
The whole response was being printed which was far too verbose
for the purposes of logging.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
  • Loading branch information
alexellis committed Mar 9, 2020
1 parent 8034196 commit 89fe99e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion garbage-collect/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 89fe99e

Please sign in to comment.