summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-09-26 09:58:43 +0200
committerErich Eckner <git@eckner.net>2018-09-26 09:58:43 +0200
commit91198046801e3365ed384c19d3cba7724ba1ba93 (patch)
treedcd90e293393444a35db915d58f813db3a8e08a4 /bin
parent2aade49a60639dc0f99280e0ab6ffe92a967f53b (diff)
downloadbuilder-91198046801e3365ed384c19d3cba7724ba1ba93.tar.xz
bin/ping-from-slave: use $operator instead of querying it from the database
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ping-from-slave18
1 files changed, 4 insertions, 14 deletions
diff --git a/bin/ping-from-slave b/bin/ping-from-slave
index 94fa1c8..2d0cf2c 100755
--- a/bin/ping-from-slave
+++ b/bin/ping-from-slave
@@ -42,21 +42,11 @@ if [ "${status% *}" != '1' ]; then
printf ' SET `build_slaves`.`is_sane`=0'
printf ' WHERE `build_slaves`.`name`=from_base64("%s");\n' \
"$(printf '%s' "${slave}" | base64 -w0)"
- printf 'SELECT'
- printf ' `persons`.`name`,'
- printf '`build_slaves`.`name`'
- printf ' FROM `build_slaves`'
- mysql_join_build_slaves_ssh_keys
- mysql_join_ssh_keys_persons
- printf ' WHERE `build_slaves`.`name`=from_base64("%s");\n' \
- "$(printf '%s' "${slave}" | base64 -w0)"
} | \
- mysql_run_query | \
- while read -r operator slave; do
- printf '/j %s Your buildslave "%s" builds some outdated package.\n' \
- "${operator}" "${slave}" | \
- sponge "${irc_dir}/in"
- done
+ mysql_run_query
+ printf '/j %s Your buildslave "%s" builds some outdated package.\n' \
+ "${operator}" "${slave}" | \
+ sponge "${irc_dir}/in"
fi
fi
exit 2