diff --git a/html/user/submit_rpc_handler.php b/html/user/submit_rpc_handler.php
index 19c741107f..54f21fc2f1 100644
--- a/html/user/submit_rpc_handler.php
+++ b/html/user/submit_rpc_handler.php
@@ -551,15 +551,19 @@ function show_job_details($wu) {
if ($wu->error_mask && $r->outcome == RESULT_OUTCOME_CLIENT_ERROR) {
echo " $r->exit_status\n";
}
+ if ($r->id == $wu->canonical_resultid) {
+ echo " $r->cpu_time\n";
+ }
}
if ($wu->error_mask) {
+ echo " error\n";
return;
}
if ($wu->canonical_resultid) {
echo " done\n";
} else {
- if ($in_progress) {
+ if ($in_progress > 0) {
echo " in_progress\n";
} else {
echo " queued\n";
@@ -593,31 +597,27 @@ function query_batch($r) {
}
$wus = BoincWorkunit::enum("batch = $batch->id", "order by id");
- if (count($wus) > 0) {
- $batch = get_batch_params($batch, $wus);
- $get_cpu_time = (int)($r->get_cpu_time);
- $get_job_details = (int)($r->get_job_details);
- print_batch_params($batch, $get_cpu_time);
- foreach ($wus as $wu) {
- echo "
- $wu->id
- $wu->name
- $wu->canonical_resultid
+ $batch = get_batch_params($batch, $wus);
+ $get_cpu_time = (int)($r->get_cpu_time);
+ $get_job_details = (int)($r->get_job_details);
+ print_batch_params($batch, $get_cpu_time);
+ foreach ($wus as $wu) {
+ echo "
+ $wu->id
+ $wu->name
+ $wu->canonical_resultid
";
- // does anyone need this?
- //
- if (0) {
- $n_outfiles = n_outfiles($wu);
- echo " $n_outfiles\n";
- }
-
- if ($get_job_details) {
- show_job_details($wu);
- }
- echo " \n";
+ // does anyone need this?
+ //
+ if (0) {
+ $n_outfiles = n_outfiles($wu);
+ echo " $n_outfiles\n";
}
- } else {
- echo "no jobs found\n";
+
+ if ($get_job_details) {
+ show_job_details($wu);
+ }
+ echo " \n";
}
echo "\n";
}
diff --git a/tools/submit_api_test.py b/tools/submit_api_test.py
index 6e89ee7754..5048989320 100644
--- a/tools/submit_api_test.py
+++ b/tools/submit_api_test.py
@@ -190,5 +190,5 @@ def test_get_output_files():
r = get_output_files(req)
print(r)
-test_query_batch(326)
-#test_submit_batch('batch_30')
+test_query_batch(328)
+#test_submit_batch('batch_31')