- feeder: simplified DB query

- make_project: remove space after URL in schedulers.txt

svn path=/trunk/boinc/; revision=13127
This commit is contained in:
David Anderson 2007-07-09 20:09:49 +00:00
parent d5abeb9761
commit 3e340136da
4 changed files with 21 additions and 6 deletions

View File

@ -7126,3 +7126,12 @@ Rom 9 July 2007
clientgui/
MainDocument.cpp
David 9 July 2007
- feeder: simplified DB query
- make_project: remove space after URL in schedulers.txt
db/
boinc_db.C
constraints.sql
py/Boinc/
setup_project.py

View File

@ -1303,9 +1303,12 @@ int DB_WORK_ITEM::enumerate(
int retval;
MYSQL_ROW row;
if (!cursor.active) {
// use "r1" to refer to the result, since the feeder assumes that
// (historical reasons)
//
sprintf(query,
"select high_priority r2.id, r2.priority, workunit.* from result r1, result r2, workunit "
" where r1.server_state=%d and r2.id=r1.id and r1.workunitid=workunit.id "
"select high_priority r1.id, r1.priority, workunit.* from result r1 force index(ind_res_st), workunit "
" where r1.server_state=%d and r1.workunitid=workunit.id "
" %s "
" %s "
"limit %d",
@ -1340,9 +1343,12 @@ int DB_WORK_ITEM::enumerate_all(
int retval;
MYSQL_ROW row;
if (!cursor.active) {
// use "r1" to refer to the result, since the feeder assumes that
// (historical reasons)
//
sprintf(query,
"select high_priority r2.id, r2.priority, workunit.* from result r1, result r2, workunit "
" where r1.server_state=%d and r2.id=r1.id and r1.workunitid=workunit.id and r1.id>%d "
"select high_priority r1.id, r1.priority, workunit.* from result r1 force index(ind_res_st), workunit force index(primary)"
" where r1.server_state=%d and r1.workunitid=workunit.id and r1.id>%d "
" %s "
"limit %d",
RESULT_SERVER_STATE_UNSENT,

View File

@ -50,7 +50,7 @@ alter table result
-- feeder
add index res_app_state(appid, server_state),
-- splitter, e.g.
-- to get count of unsent results for given app (e.g. in work generator)
add index res_filedel (file_delete_state),
-- file_deleter

View File

@ -508,7 +508,7 @@ class Project:
else:
scheduler_file = 'schedulers.txt'
f = open(self.dir('html/user', scheduler_file), 'w')
print >>f, "<!-- <scheduler>" + self.scheduler_url.strip(), "</scheduler> -->"
print >>f, "<!-- <scheduler>" + self.scheduler_url.strip() + "</scheduler> -->"
print >>f, "<link rel=\"boinc_scheduler\" href=\"" + self.scheduler_url.strip()+ "\">"
f.close()