mirror of https://github.com/BOINC/boinc.git
propagate batch to result
svn path=/trunk/boinc/; revision=9318
This commit is contained in:
parent
d99d85baab
commit
f471b89bf9
|
@ -1021,3 +1021,17 @@ David 25 Jan 2006
|
|||
|
||||
client/
|
||||
acct_mgr.C
|
||||
|
||||
David 25 Jan 2006
|
||||
- Initialize result.batch to workunit.batch
|
||||
This required adding a batch field to TRANSITIONER_ITEM.
|
||||
(for Rosetta@home)
|
||||
|
||||
Note: if you're using the batch field for anything,
|
||||
you should add indices on it to workunit and/or result
|
||||
|
||||
|
||||
db/
|
||||
boinc_db.C,h
|
||||
tools/
|
||||
backend_lib.C
|
||||
|
|
|
@ -851,6 +851,7 @@ void TRANSITIONER_ITEM::parse(MYSQL_ROW& r) {
|
|||
target_nresults = atoi(r[i++]);
|
||||
strcpy2(result_template_file, r[i++]);
|
||||
priority = atoi(r[i++]);
|
||||
batch = atoi(r[i++]);
|
||||
|
||||
// use safe_atoi() from here on cuz they might not be there
|
||||
//
|
||||
|
@ -908,6 +909,7 @@ int DB_TRANSITIONER_ITEM_SET::enumerate(
|
|||
" wu.target_nresults, "
|
||||
" wu.result_template_file, "
|
||||
" wu.priority, "
|
||||
" wu.batch, "
|
||||
" res.id, "
|
||||
" res.name, "
|
||||
" res.report_deadline, "
|
||||
|
|
|
@ -482,6 +482,7 @@ struct TRANSITIONER_ITEM {
|
|||
int target_nresults;
|
||||
char result_template_file[64];
|
||||
int priority;
|
||||
int batch;
|
||||
int res_id;
|
||||
char res_name[256];
|
||||
int res_report_deadline;
|
||||
|
|
|
@ -322,11 +322,9 @@ static int process_wu_template(
|
|||
return 0;
|
||||
}
|
||||
|
||||
// Set the time-varying fields of a result to their initial state.
|
||||
// This is used to create clones of existing results,
|
||||
// so set only the time-varying fields
|
||||
// initialize an about-to-be-created result, given its WU
|
||||
//
|
||||
void initialize_result(DB_RESULT& result, TRANSITIONER_ITEM& wu) {
|
||||
static void initialize_result(DB_RESULT& result, TRANSITIONER_ITEM& wu) {
|
||||
result.id = 0;
|
||||
result.create_time = time(0);
|
||||
result.workunitid = wu.id;
|
||||
|
@ -346,6 +344,7 @@ void initialize_result(DB_RESULT& result, TRANSITIONER_ITEM& wu) {
|
|||
result.granted_credit = 0;
|
||||
result.appid = wu.appid;
|
||||
result.priority = wu.priority;
|
||||
result.batch = wu.batch;
|
||||
}
|
||||
|
||||
// Create a new result for the given WU.
|
||||
|
|
Loading…
Reference in New Issue