From 0fe6167a0b465003cdb1645f14c395d61637e91d Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sat, 8 Nov 2003 00:23:06 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=2646 --- checkin_notes | 10 ++++++++++ html/ops/db_form.php | 1 + sched/make_work.C | 19 +++++++++++++++++-- 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/checkin_notes b/checkin_notes index 38162e8489..75f0f23861 100755 --- a/checkin_notes +++ b/checkin_notes @@ -7596,3 +7596,13 @@ David 7 Nov 2003 app.C lib/ filesys.C + +David 7 Nov 2003 + - In make_work, need to initialize many fields of the WU being created. + For example, if assimilate_state is not INIT, + the transitioner will not create any results for the new WU! + + html_ops/ + db_form.php + sched/ + make_work.C diff --git a/html/ops/db_form.php b/html/ops/db_form.php index 7df6a8c2d4..78c81721eb 100644 --- a/html/ops/db_form.php +++ b/html/ops/db_form.php @@ -43,6 +43,7 @@ require_once("db_ops.inc"); print_detail_field(); } else if ($table=="workunit") { print_detail_field(); + print_query_field(); echo "\n"; } else if ($table=="result") { echo "Server state "; diff --git a/sched/make_work.C b/sched/make_work.C index 78edceed42..30662104c1 100644 --- a/sched/make_work.C +++ b/sched/make_work.C @@ -216,18 +216,33 @@ void make_work() { } p = strtok(0, "\n"); } - sprintf(wu.name, "wu_%d_%d", start_time, seqno++); + + // set various fields for new WU (all others are copied) + // wu.id = 0; wu.create_time = time(0); + sprintf(wu.name, "wu_%d_%d", start_time, seqno++); wu.min_quorum = min_quorum; wu.target_nresults = target_nresults; wu.max_error_results = max_error_results; wu.max_total_results = max_total_results; wu.max_success_results = max_success_results; + wu.need_validate = false; + wu.canonical_resultid = 0; + wu.canonical_credit = 0; + wu.transition_time = time(0); + wu.error_mask = 0; + wu.file_delete_state = FILE_DELETE_INIT; + wu.assimilate_state = ASSIMILATE_INIT; strcpy(wu.result_template, result_template); process_result_template_upload_url_only(wu.result_template, config.upload_url); - wu.transition_time = time(0); retval = wu.insert(); + if (retval) { + log_messages.printf(SchedMessages::CRITICAL, + "Failed to created WU, error %d; exiting\n", retval + ); + exit(retval); + } wu.id = boinc_db.insert_id(); log_messages.printf(SchedMessages::DEBUG, "[%s] Created new WU\n", wu.name); }