scheduler: don't penalize hosts for jobs aborted by server

If a job was aborted by server (exit status is EXIT_ABORTED_BY_PROJECT)
don't decrement daily quota or reset the consecutive valid count.
This commit is contained in:
David Anderson 2014-05-23 12:25:41 -07:00
parent 53b9ad0a4d
commit 7a65508923
1 changed files with 10 additions and 2 deletions

View File

@ -57,6 +57,11 @@ static inline void got_good_result(SCHED_RESULT_ITEM& sri) {
}
}
// This is called then a job crashed or exceeded limits on a host.
// Enforce
// - mechanism that reduces jobs per day to that host
// - mechanism that categorizes hosts as "reliable"
//
static inline void got_bad_result(SCHED_RESULT_ITEM& sri) {
int gavid = generalized_app_version_id(sri.app_version_id, sri.appid);
DB_HOST_APP_VERSION* havp = gavid_to_havp(gavid);
@ -388,9 +393,12 @@ int handle_results() {
srip->outcome = RESULT_OUTCOME_CLIENT_ERROR;
srip->validate_state = VALIDATE_STATE_INVALID;
// adjust quota and reset error rate
// adjust quota and reset consecutive valid
// (but not if aborted by project)
//
got_bad_result(*srip);
if (srip->exit_status != EXIT_ABORTED_BY_PROJECT) {
got_bad_result(*srip);
}
}
} // loop over all incoming results