scheduler: if a result was aborted by user, don't count it as an error

This commit is contained in:
David Anderson 2014-05-22 23:54:56 -07:00
parent 70639a738a
commit de6540cbc0
3 changed files with 12 additions and 1 deletions

View File

@ -1494,6 +1494,7 @@ void TRANSITIONER_ITEM::parse(MYSQL_ROW& r) {
res_hostid = safe_atoi(r[i++]);
res_received_time = safe_atoi(r[i++]);
res_app_version_id = safe_atoi(r[i++]);
res_exit_status = safe_atoi(r[i++]);
}
int DB_TRANSITIONER_ITEM_SET::enumerate(
@ -1551,7 +1552,8 @@ int DB_TRANSITIONER_ITEM_SET::enumerate(
" res.sent_time, "
" res.hostid, "
" res.received_time, "
" res.app_version_id "
" res.app_version_id, "
" res.exit_status "
"FROM "
" workunit AS wu "
" LEFT JOIN result AS res ON wu.id = res.workunitid "

View File

@ -67,6 +67,7 @@ struct TRANSITIONER_ITEM {
int res_hostid;
int res_received_time;
int res_app_version_id;
int res_exit_status;
void clear();
void parse(MYSQL_ROW&);

View File

@ -296,6 +296,14 @@ int handle_wu(
}
break;
case RESULT_OUTCOME_CLIENT_ERROR:
// is user aborted job, don't count it as an error
//
if (res_item.res_exit_status == EXIT_ABORTED_VIA_GUI) {
nno_reply++;
} else {
nerrors++;
}
break;
case RESULT_OUTCOME_VALIDATE_ERROR:
nerrors++;
break;