mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=2140
This commit is contained in:
parent
b2c7376fd8
commit
a1f76ca6ff
|
@ -5837,6 +5837,8 @@ Karl 2003/08/18
|
|||
sched/
|
||||
transitioner.C
|
||||
make_work.C
|
||||
lib/
|
||||
backend_lib.C
|
||||
|
||||
py/boinc.py
|
||||
test/*.py
|
||||
|
|
|
@ -238,6 +238,8 @@ def num_wus(db, q=""):
|
|||
return db_query(db, "select count(*) from workunit "+q)[0]['count(*)']
|
||||
def num_wus_assimilated(db):
|
||||
return num_wus(db, "where assimilate_state=%d"%ASSIMILATE_DONE)
|
||||
def num_wus_to_transition(db):
|
||||
return num_wus(db, "where transition_time<%d"%(time.time()+30*86400))
|
||||
|
||||
def query_yesno(str):
|
||||
'''Query user; default Yes'''
|
||||
|
|
|
@ -323,7 +323,7 @@ class TestProject(Project):
|
|||
time.sleep(5)
|
||||
def run_finish_wait(self):
|
||||
db = self.db_open()
|
||||
while num_wus_assimilated(db) < num_wu:
|
||||
while (num_wus_assimilated(db) < self.num_wu) or num_wus_to_transition(db):
|
||||
time.sleep(.5)
|
||||
|
||||
def check(self):
|
||||
|
|
|
@ -229,30 +229,14 @@ int create_work(
|
|||
strcpy(wu.result_template, _result_template);
|
||||
process_result_template_upload_url_only(wu.result_template, upload_url);
|
||||
|
||||
wu.transition_time = time(0);
|
||||
retval = wu.insert();
|
||||
if (retval) {
|
||||
fprintf(stderr, "create_work: workunit.insert() %d\n", retval);
|
||||
return retval;
|
||||
}
|
||||
wu.transition_time = time(0);
|
||||
wu.id = boinc_db_insert_id();
|
||||
|
||||
#if 0
|
||||
char suffix[256];
|
||||
char result_template[MAX_BLOB_SIZE];
|
||||
int i;
|
||||
for (i=0; i<wu.target_nresults; i++) {
|
||||
sprintf(suffix, "%d", i);
|
||||
strcpy(result_template, _result_template);
|
||||
retval = create_result(
|
||||
wu, result_template, suffix, key, upload_url
|
||||
);
|
||||
if (retval) {
|
||||
fprintf(stderr, "create_result: %d\n", retval);
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue