Skip to content

Commit

Permalink
Improved/Corrected for loop logic
Browse files Browse the repository at this point in the history
Co-authored-by: Adam Matthews <[email protected]>
  • Loading branch information
TrevorBenson and adamsthws authored Jan 13, 2025
1 parent 0644d5f commit 859b0e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion files/docker/node/addons/healthcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ check_process() {
local process_name="$1"
local cpu_threshold="$2"

for (( CHECK=1; CHECK<=RETRIES; CHECK++ )); do
for (( CHECK=0; CHECK<=RETRIES; CHECK++ )); do
# Check CPU usage of the process
CPU_USAGE=$(ps -C "$process_name" -o %cpu= | awk '{s+=$1} END {print int(s + 0.5)}')

Expand Down

0 comments on commit 859b0e5

Please sign in to comment.