From 4e708195f1ccb3c2abad5cc6335b4b5d7dd17ffa Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Sun, 22 Apr 2018 17:10:33 +0200 Subject: bin/db-update,bin/return-assignment: update `binary_packages`.`last_moved` --- bin/return-assignment | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bin/return-assignment') diff --git a/bin/return-assignment b/bin/return-assignment index 9e64ff0..1b7a872 100755 --- a/bin/return-assignment +++ b/bin/return-assignment @@ -536,7 +536,8 @@ trigger_mirror_refreshs base64 -w0 )" printf ' `binary_packages`.`has_issues`=0,' - printf ' `binary_packages`.`is_tested`=0' + printf ' `binary_packages`.`is_tested`=0,' + printf ' `binary_packages`.`last_moved`=NOW()' printf ' WHERE `build_slaves`.`name`=from_base64("%s")' \ "$( printf '%s' "${slave}" | \ -- cgit v1.2.3-70-g09d2 From cefea1135f1a88ceb77f45758b07c0c824cd9d71 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 24 Apr 2018 12:49:12 +0200 Subject: bin/return-assignment: do not try to add failures if none were identified --- bin/return-assignment | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'bin/return-assignment') diff --git a/bin/return-assignment b/bin/return-assignment index 1b7a872..bcdb717 100755 --- a/bin/return-assignment +++ b/bin/return-assignment @@ -99,7 +99,6 @@ if [ "$5" = 'ERROR' ]; then 'log_file' 'VARCHAR(512)' | \ sed 's/,$//' printf ');\n' - printf 'INSERT INTO `failures` (`date`,`reason`,`log_file`) VALUES' fail_reason_identifiers=$( { printf 'SELECT `fail_reasons`.`id`,replace(to_base64(`fail_reasons`.`identifier`),"\\n","")' @@ -131,8 +130,10 @@ if [ "$5" = 'ERROR' ]; then fi done done | \ - sed 's/,$//' - printf ';\n' + sed ' + 1 s/^/INSERT INTO `failures` (`date`,`reason`,`log_file`) VALUES / + s/,$/;\n/ + ' printf 'INSERT INTO `failed_builds` (`build_slave`,`build_assignment`,`date`,`reason`,`log_file`)' printf ' SELECT ' printf '`build_slaves`.`%s`,' \ -- cgit v1.2.3-70-g09d2