summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ping-from-slave17
1 files changed, 15 insertions, 2 deletions
diff --git a/bin/ping-from-slave b/bin/ping-from-slave
index 2ae9f7e..171661d 100755
--- a/bin/ping-from-slave
+++ b/bin/ping-from-slave
@@ -56,9 +56,22 @@ log_lines=$(cat)
printf 'NULL'
fi
- printf ' WHERE `build_slaves`.`name`=from_base64("%s");\n' \
+ printf ', `build_slaves`.`trials`='
+ if [ -n "${log_lines}" ]; then
+ printf 'from_base64("%s")' \
+ "$(
+ printf '%s\n' "${log_lines}" | \
+ wc -l | \
+ base64 -w0
+ )"
+ else
+ printf 'NULL'
+ fi
+
+ printf ' WHERE `build_slaves`.`id`=from_base64("%s");\n' \
"$(
- printf '%s' "${slave}" | \
+ # shellcheck disable=SC2154
+ printf '%s' "${slave_id}" | \
base64 -w0
)"
} | \