|
|
@@ -124,9 +124,7 @@ function respond { |
|
|
|
continue |
|
|
|
fi |
|
|
|
|
|
|
|
statuscodes=() # Exit status for each `batch` element's codearchiver process (-1 for 'end' markers) |
|
|
|
newfiles=() |
|
|
|
newfilejobindices=() # One entry for each element of `newfiles`, containing the corresponding index in `batch` to which the file belongs |
|
|
|
|
|
|
|
for ((i=0; i<${#batch[@]}; ++i)); do |
|
|
|
line="${batch[${i}]}" |
|
|
@@ -139,7 +137,6 @@ function respond { |
|
|
|
if [[ "${url}" == 'end' ]]; then |
|
|
|
# No status code reflection here because the start of the list job might not even have been in this batch. |
|
|
|
respond "${nick}" "Job ${singlejobid} finished." |
|
|
|
statuscodes+=(-1) |
|
|
|
continue |
|
|
|
fi |
|
|
|
|
|
|
@@ -164,7 +161,6 @@ function respond { |
|
|
|
3> >(tee "${artefactsname}" | log_loop "New artefacts from codearchiver ${singlejobid}: ") |
|
|
|
status="$?" |
|
|
|
log "codearchiver ${url} finished with status code ${status}" |
|
|
|
statuscodes+=("${status}") |
|
|
|
#TODO Integrate this into the pipe from codearchiver above to avoid rereading the entire log file |
|
|
|
declare -i badcount=$(awk '! ($3 ~ /^INFO$/) { cnt += 1; } END { printf "%d\n", cnt; }' "${logname}") |
|
|
|
|
|
|
@@ -186,13 +182,10 @@ function respond { |
|
|
|
else |
|
|
|
for file in "${artefacts[@]}"; do |
|
|
|
newfiles+=("${file}") |
|
|
|
newfilejobindices+=("${i}") |
|
|
|
done |
|
|
|
newfiles+=("${artefactsname}") |
|
|
|
newfilejobindices+=("${i}") |
|
|
|
fi |
|
|
|
newfiles+=("${logname}") |
|
|
|
newfilejobindices+=("${i}") |
|
|
|
|
|
|
|
# For individual jobs, tell the user about warnings and success/failure |
|
|
|
if [[ "${singlejobid}" != *_* ]]; then |
|
|
|