diff --git a/html/user/submit_rpc_handler.php b/html/user/submit_rpc_handler.php
index 1edaff458f..953cbc774a 100644
--- a/html/user/submit_rpc_handler.php
+++ b/html/user/submit_rpc_handler.php
@@ -191,9 +191,12 @@ function submit_batch($r) {
// TODO: if rsc_fpops_est not defined here, get it from template
}
$cmd = "cd ../../bin; ./adjust_user_priority --user $user->id --flops $total_flops --app $app->name";
- system($cmd);
- $us = BoincUserSubmit::lookup_userid($user->id);
- $let = $us->logical_start_time;
+ $x = system($cmd);
+ if (!is_numeric($x) || (double)$x == 0) {
+ echo adjust_user_priority returned $x\n";
+ exit;
+ }
+ $let = (double)$x;
$batch_id = BoincBatch::insert(
"(user_id, create_time, njobs, name, app_id, logical_end_time, state) values ($user->id, $now, $njobs, '$batch_name', $app->id, $let, ".BATCH_STATE_IN_PROGRESS.")"
diff --git a/sched/adjust_user_priority.cpp b/sched/adjust_user_priority.cpp
index a2408c76e4..ac64af4bba 100644
--- a/sched/adjust_user_priority.cpp
+++ b/sched/adjust_user_priority.cpp
@@ -15,11 +15,13 @@
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see .
-// adjust_user_priority [--print] --user userid --flops flop_count --app app_name
+// adjust_user_priority [--no_update] --user userid --flops flop_count --app app_name
//
// adjust user priority (i.e. logical start time)
// to reflect a certain amount of computing
-// --print: don't update DB; write LST increment to stdout
+// and write the new value to stdout
+//
+// --no_update: don't update DB
#include
#include
@@ -29,7 +31,7 @@
void usage(const char* msg="") {
fprintf(stderr,
- "%susage: adjust_user_priority [--print] --user userid --flops flop_count --app app_name\n",
+ "%susage: adjust_user_priority [--no_update] --user userid --flops flop_count --app app_name\n",
msg
);
exit(1);
@@ -37,14 +39,14 @@ void usage(const char* msg="") {
int main(int argc, char** argv) {
char buf[256];
- bool print = false;
+ bool no_update = false;
int userid=0;
char* app_name = NULL;
double flop_count = 0;
for (int i=1; iname:"missing";
+ delta_t = dtime() - wu_result.time_added_to_shared_memory;
+ fprintf(f,
+ "%4d %12.12s %10d %10d %10d %8d %10d %7ds %12f %12s %9d\n",
+ i,
+ appname,
+ wu_result.workunit.id,
+ wu_result.resultid,
+ wu_result.workunit.batch,
+ wu_result.workunit.hr_class,
+ wu_result.res_priority,
+ delta_t,
+ wu_result.fpops_size,
+ wu_result.need_reliable?"yes":"no",
+ wu_result.infeasible_count
);
break;
case WR_STATE_EMPTY: