From 1a0841453b169bf9ebe1b41dfbb63b4f4cb96c4f Mon Sep 17 00:00:00 2001 From: Frikky Date: Mon, 23 Oct 2023 00:00:40 +0200 Subject: [PATCH] Minor build changes --- functions/onprem/orborus/build.sh | 2 +- functions/onprem/orborus/orborus.go | 7 ++++--- functions/onprem/worker/build.sh | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/functions/onprem/orborus/build.sh b/functions/onprem/orborus/build.sh index 60161e59..bbec5067 100755 --- a/functions/onprem/orborus/build.sh +++ b/functions/onprem/orborus/build.sh @@ -1,5 +1,5 @@ NAME=shuffle-orborus -VERSION=1.2.2 +VERSION=1.3.0 echo "Running docker build with $NAME:$VERSION" #docker rmi frikky/shuffle:$NAME --force diff --git a/functions/onprem/orborus/orborus.go b/functions/onprem/orborus/orborus.go index 1685f350..c50202da 100755 --- a/functions/onprem/orborus/orborus.go +++ b/functions/onprem/orborus/orborus.go @@ -1364,8 +1364,9 @@ func main() { log.Printf("[ERROR] Failed marshalling. Maybe max 4 second timeout? %s", err) } - if orborusStats.CPUPercent > 80 { - log.Printf("[DEBUG] CPU usage is at %f%%. This may be the max limit the machine should be running at.", orborusStats.CPUPercent) + maxAmount := 80 + if orborusStats.CPUPercent > maxAmount { + log.Printf("[DEBUG] CPU usage is at %f%%. This is more than the max limit the machine should be running at (%d).", orborusStats.CPUPercent, maxAmount) } } @@ -1893,6 +1894,6 @@ func sendWorkerRequest(workflowExecution shuffle.ExecutionRequest) error { _ = body - log.Printf("[DEBUG] Ran worker from request with execution ID: %s. Worker URL: %s. DEBUGGING: docker service logs shuffle-workers 2>&1 | grep %s", workflowExecution.ExecutionId, streamUrl, workflowExecution.ExecutionId) + log.Printf("[DEBUG] Ran worker from request with execution ID: %s. Worker URL: %s. DEBUGGING:\ndocker service logs shuffle-workers 2>&1 -f | grep %s", workflowExecution.ExecutionId, streamUrl, workflowExecution.ExecutionId) return nil } diff --git a/functions/onprem/worker/build.sh b/functions/onprem/worker/build.sh index 1c58cfda..ad97c321 100755 --- a/functions/onprem/worker/build.sh +++ b/functions/onprem/worker/build.sh @@ -1,5 +1,5 @@ NAME=shuffle-worker -VERSION=1.2.2 +VERSION=1.3.0 echo "Running docker build with $NAME:$VERSION" #CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o worker.bin .