2003-01-23 08:07:48 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
|
2003-04-07 19:06:00 +00:00
|
|
|
#include "boinc_db.h"
|
2003-01-23 08:07:48 +00:00
|
|
|
#include "assimilate_handler.h"
|
2003-06-14 20:25:37 +00:00
|
|
|
#include "sched_util.h"
|
2003-01-23 08:07:48 +00:00
|
|
|
|
|
|
|
void assimilate_handler(
|
|
|
|
WORKUNIT& wu, vector<RESULT>& results, RESULT& canonical_result
|
2003-08-12 20:58:24 +00:00
|
|
|
) {
|
2003-07-02 20:57:59 +00:00
|
|
|
ScopeMessages scope_messages(log_messages, SchedMessages::NORMAL);
|
|
|
|
scope_messages.printf("[%s] Assimilating\n", wu.name);
|
2003-01-23 08:07:48 +00:00
|
|
|
if (wu.canonical_resultid) {
|
2003-07-02 20:57:59 +00:00
|
|
|
scope_messages.printf("[%s] Found canonical result\n", wu.name);
|
2003-08-12 20:58:24 +00:00
|
|
|
log_messages.printf_multiline(
|
|
|
|
SchedMessages::DEBUG, canonical_result.xml_doc_out,
|
|
|
|
"[%s] canonical result", wu.name
|
|
|
|
);
|
2003-01-23 08:07:48 +00:00
|
|
|
} else {
|
2003-07-02 20:57:59 +00:00
|
|
|
scope_messages.printf("[%s] No canonical result\n", wu.name);
|
2003-01-23 08:07:48 +00:00
|
|
|
}
|
|
|
|
if (wu.error_mask&WU_ERROR_COULDNT_SEND_RESULT) {
|
2003-07-02 20:57:59 +00:00
|
|
|
log_messages.printf(SchedMessages::CRITICAL, "[%s] Error: couldn't send a result\n", wu.name);
|
2003-01-23 08:07:48 +00:00
|
|
|
}
|
|
|
|
if (wu.error_mask&WU_ERROR_TOO_MANY_ERROR_RESULTS) {
|
2003-07-02 20:57:59 +00:00
|
|
|
log_messages.printf(SchedMessages::CRITICAL, "[%s] Error: too many error results\n", wu.name);
|
2003-01-23 08:07:48 +00:00
|
|
|
}
|
2003-08-15 20:35:44 +00:00
|
|
|
if (wu.error_mask&WU_ERROR_TOO_MANY_TOTAL_RESULTS) {
|
2003-07-02 20:57:59 +00:00
|
|
|
log_messages.printf(SchedMessages::CRITICAL, "[%s] Error: too many total results\n", wu.name);
|
2003-01-23 08:07:48 +00:00
|
|
|
}
|
2003-08-15 20:35:44 +00:00
|
|
|
if (wu.error_mask&WU_ERROR_TOO_MANY_SUCCESS_RESULTS) {
|
|
|
|
log_messages.printf(SchedMessages::CRITICAL, "[%s] Error: too many success results\n", wu.name);
|
|
|
|
}
|
2003-01-23 08:07:48 +00:00
|
|
|
}
|