From 91198046801e3365ed384c19d3cba7724ba1ba93 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 26 Sep 2018 09:58:43 +0200 Subject: bin/ping-from-slave: use $operator instead of querying it from the database --- bin/ping-from-slave | 18 ++++-------------- 1 file 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 -- cgit v1.2.3-70-g09d2