diff --git a/checkin_notes b/checkin_notes index e75b395085..bd8f154e76 100644 --- a/checkin_notes +++ b/checkin_notes @@ -9645,3 +9645,20 @@ Rom 18 Oct 2007 clientlib/win/ IdleTracker.cpp + +David 18 Oct 2007 + - Bossa: + JSON-encode stuff + use text instead of varchar(255) a couple of places + create Bossa class for utility functions + + db/ + bossa_constraints.sql + bossa_schema.sql + html/ + inc/ + bossa.inc (new) + ops/ + bossa_make_jobs_example.php + user/ + bossa_example.php diff --git a/db/bossa_constraints.sql b/db/bossa_constraints.sql index 94530740ce..fa73f16e4d 100644 --- a/db/bossa_constraints.sql +++ b/db/bossa_constraints.sql @@ -3,7 +3,7 @@ alter table bossa_app alter table bossa_job add unique(name), - add index bj_more_needed(app, more_needed); + add index bj_more_needed(app_id, more_needed); alter table bossa_job_inst add index bji_job(job_id), diff --git a/db/bossa_schema.sql b/db/bossa_schema.sql index 8c7faf42d1..8dcbf4200b 100644 --- a/db/bossa_schema.sql +++ b/db/bossa_schema.sql @@ -6,7 +6,7 @@ create table bossa_app ( long_jobs tinyint not null, start_url varchar(255) not null, deprecated tinyint not null, - beta tinyint not null, + info text, primary key(id) ); @@ -15,7 +15,7 @@ create table bossa_job ( create_time integer not null, name varchar(255) not null, app_id integer not null, - info varchar(255) not null, + info text, batch integer not null, time_estimate integer not null, time_limit integer not null, @@ -32,6 +32,12 @@ create table bossa_job_inst ( job_id integer not null, user_id integer not null, finish_time integer not null, - info varchar(255) not null, + info text, primary key(id) ); + +create table bossa_app_user ( + app_id integer not null, + user_id integer not null, + info text +); diff --git a/doc/boinc_news.php b/doc/boinc_news.php index 214b4166b4..7c9403bc12 100644 --- a/doc/boinc_news.php +++ b/doc/boinc_news.php @@ -2,6 +2,16 @@ $project_news = array( +array("October 17, 2007", + "Congratulations to the UK BOINC Team, + which today became the first UK-specific team to + pass the 100 million combined credits mark." +), +array("October 17, 2007", + "An article in Nature, + The shape of protein structures to come, discusses the goals and progress of the + Rosetta@home project from the University of Washington." +), array("October 12, 2007", "LHC@home has moved from CERN to the University of London. Read about it here." diff --git a/html/inc/bossa.inc b/html/inc/bossa.inc new file mode 100644 index 0000000000..2093ed4efb --- /dev/null +++ b/html/inc/bossa.inc @@ -0,0 +1,30 @@ +user_id != $user->id) { + error_page("Bad user ID"); + } + $bj = BossaJob::lookup_id($bji->job_id); + if (!$bj) { + error_page("No such job"); + } + } + + static function show_next_job($bj) { + $url = "bossa_get_job.php?bossa_app_id=$bj->app_id"; + Header("Location: $url"); + } +} + +?> diff --git a/html/inc/bossa_db.inc b/html/inc/bossa_db.inc index a5e483c1ab..efe720ca19 100644 --- a/html/inc/bossa_db.inc +++ b/html/inc/bossa_db.inc @@ -1,9 +1,9 @@ id"); } static function lookup_id($id) { - return bossa_lookup($id, 'bossa_job'); + return bossa_lookup($id, 'bossa_job', 'BossaJob'); } } @@ -66,7 +66,7 @@ class BossaJobInst { } static function lookup_id($id) { - return bossa_lookup($id, 'bossa_job_inst'); + return bossa_lookup($id, 'bossa_job_inst', 'BossaJobInst'); } function update($clause) { @@ -81,10 +81,10 @@ class BossaJobInst { // has already been assigned an instance // $query = "select bossa_job.* from bossa_job left join bossa_job_inst on bossa_job_inst.job_id = bossa_job.id where bossa_job.more_needed<>0 and bossa_job_inst.user_id is null limit 1"; - echo "$query\n"; $result = mysql_query($query); if (!$result) return null; - $job = mysql_fetch_object($result); + $job = mysql_fetch_object($result, 'BossaJob'); + if (!$job) return null; mysql_free_result($result); echo "